@@ -29,6 +29,18 @@ export function getStyleRules({
29
29
plugins : postCssPlugins ,
30
30
} ,
31
31
} ;
32
+ const sassLoaderOptions = {
33
+ sassOptions : {
34
+ quietDeps : true ,
35
+ silenceDeprecations : [
36
+ 'import' , // https://sass-lang.com/documentation/breaking-changes/import/
37
+ 'global-builtin' , // https://sass-lang.com/documentation/breaking-changes/import/
38
+ 'mixed-decls' , // https://sass-lang.com/documentation/breaking-changes/mixed-decls/
39
+ 'color-functions' , // https://sass-lang.com/documentation/breaking-changes/color-functions/
40
+ 'slash-div' , // https://sass-lang.com/documentation/breaking-changes/slash-div/
41
+ ] ,
42
+ } ,
43
+ } ;
32
44
33
45
if ( bundleStylesWithJs ) {
34
46
// In development, we bundle styles with the JS.
@@ -39,7 +51,7 @@ export function getStyleRules({
39
51
{ loader : 'style-loader' } ,
40
52
{ loader : 'css-loader' , options : cssLoaderOptions } ,
41
53
{ loader : 'postcss-loader' , options : postcssLoaderOptions } ,
42
- { loader : 'sass-loader' } ,
54
+ { loader : 'sass-loader' , options : sassLoaderOptions } ,
43
55
] ,
44
56
} ,
45
57
] ;
@@ -53,7 +65,7 @@ export function getStyleRules({
53
65
MiniCssExtractPlugin . loader ,
54
66
{ loader : 'css-loader' , options : cssLoaderOptions } ,
55
67
{ loader : 'postcss-loader' , options : postcssLoaderOptions } ,
56
- { loader : 'sass-loader' } ,
68
+ { loader : 'sass-loader' , options : sassLoaderOptions } ,
57
69
] ,
58
70
} ,
59
71
] ;
0 commit comments