Skip to content

Commit 9d48d69

Browse files
alan-agius4clydin
authored andcommitted
fix(@angular-devkit/build-angular): silence Sass compiler warnings from 3rd party stylesheets
With this change we enable `quietDeps`, which causes the Sass compiler not to emit warnings from a stylesheet that is loaded through load-path. The `--verbose` option can be used to opt-out from this behaviour and display all warnings. Closes #21235 (cherry picked from commit 8383c6b)
1 parent 047cd18 commit 9d48d69

File tree

1 file changed

+6
-0
lines changed
  • packages/angular_devkit/build_angular/src/webpack/configs

1 file changed

+6
-0
lines changed

packages/angular_devkit/build_angular/src/webpack/configs/styles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
307307
// Ex: /* autoprefixer grid: autoplace */
308308
// See: https://github.com/webpack-contrib/sass-loader/blob/45ad0be17264ceada5f0b4fb87e9357abe85c4ff/src/getSassOptions.js#L68-L70
309309
outputStyle: 'expanded',
310+
// Silences compiler warnings from 3rd party stylesheets
311+
quietDeps: !buildOptions.verbose,
312+
verbose: buildOptions.verbose,
310313
},
311314
},
312315
},
@@ -336,6 +339,9 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
336339
// Ex: /* autoprefixer grid: autoplace */
337340
// See: https://github.com/webpack-contrib/sass-loader/blob/45ad0be17264ceada5f0b4fb87e9357abe85c4ff/src/getSassOptions.js#L68-L70
338341
outputStyle: 'expanded',
342+
// Silences compiler warnings from 3rd party stylesheets
343+
quietDeps: !buildOptions.verbose,
344+
verbose: buildOptions.verbose,
339345
},
340346
},
341347
},

0 commit comments

Comments
 (0)