File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,23 @@ const scssConfigIndex = baseClientWebpackConfig.module.rules.findIndex((config)
29
29
30
30
// Configure sass-loader to use the modern API
31
31
const scssRule = baseClientWebpackConfig . module . rules [ scssConfigIndex ] ;
32
- const sassLoaderIndex = scssRule . use . findIndex ( ( loader ) =>
33
- loader . loader === 'sass-loader' || ( typeof loader === 'string' && loader . includes ( 'sass-loader' ) )
34
- ) ;
32
+ const sassLoaderIndex = scssRule . use . findIndex ( ( loader ) => {
33
+ if ( typeof loader === 'string' ) {
34
+ return loader . includes ( 'sass-loader' ) ;
35
+ }
36
+ return loader . loader && loader . loader . includes ( 'sass-loader' ) ;
37
+ } ) ;
35
38
36
39
if ( sassLoaderIndex !== - 1 ) {
37
40
const sassLoader = scssRule . use [ sassLoaderIndex ] ;
38
41
if ( typeof sassLoader === 'string' ) {
39
42
scssRule . use [ sassLoaderIndex ] = {
40
- loader : 'sass-loader' ,
43
+ loader : sassLoader ,
41
44
options : {
42
- api : 'modern'
45
+ api : 'modern' ,
46
+ sassOptions : {
47
+ includePaths : [ ]
48
+ }
43
49
}
44
50
} ;
45
51
} else {
You can’t perform that action at this time.
0 commit comments