File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { Config as SvgoOptimizeOptions } from "svgo";
5
5
6
6
export interface HtmlnanoOptions {
7
7
skipConfigLoading ?: boolean ;
8
+ skipInternalWarnings ?: boolean ;
8
9
collapseAttributeWhitespace ?: boolean ;
9
10
collapseBooleanAttributes ?: {
10
11
amphtml ?: boolean ;
Original file line number Diff line number Diff line change @@ -98,7 +98,9 @@ function htmlnano(optionsRun, presetRun) {
98
98
await import ( dependency ) ;
99
99
} catch ( e ) {
100
100
if ( e . code === 'MODULE_NOT_FOUND' || e . code === 'ERR_MODULE_NOT_FOUND' ) {
101
- console . warn ( `You have to install "${ dependency } " in order to use htmlnano's "${ moduleName } " module` ) ;
101
+ if ( ! options . skipInternalWarnings ) {
102
+ console . warn ( `You have to install "${ dependency } " in order to use htmlnano's "${ moduleName } " module` ) ;
103
+ }
102
104
} else {
103
105
throw e ;
104
106
}
You can’t perform that action at this time.
0 commit comments