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

(cherry picked from commit 8383c6b)
  • Loading branch information
alan-agius4 authored and clydin committed Jul 2, 2021
1 parent 047cd18 commit 9d48d69
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,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 @@ -336,6 +339,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 9d48d69

Please sign in to comment.