Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): silence Sass compiler warnings fr…
Browse files Browse the repository at this point in the history
…om 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
  • Loading branch information
alan-agius4 authored and clydin committed Jul 2, 2021
1 parent 3c2fb5c commit 8383c6b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
// Ex: /* autoprefixer grid: autoplace */
// See: https://github.com/webpack-contrib/sass-loader/blob/45ad0be17264ceada5f0b4fb87e9357abe85c4ff/src/getSassOptions.js#L68-L70
outputStyle: 'expanded',
// Silences compiler warnings from 3rd party stylesheets
quietDeps: !buildOptions.verbose,
verbose: buildOptions.verbose,
},
},
},
Expand Down Expand Up @@ -377,6 +380,9 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
// Ex: /* autoprefixer grid: autoplace */
// See: https://github.com/webpack-contrib/sass-loader/blob/45ad0be17264ceada5f0b4fb87e9357abe85c4ff/src/getSassOptions.js#L68-L70
outputStyle: 'expanded',
// Silences compiler warnings from 3rd party stylesheets
quietDeps: !buildOptions.verbose,
verbose: buildOptions.verbose,
},
},
},
Expand Down

0 comments on commit 8383c6b

Please sign in to comment.