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)
2929
3030// Configure sass-loader to use the modern API 
3131const  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+ } ) ; 
3538
3639if  ( sassLoaderIndex  !==  - 1 )  { 
3740  const  sassLoader  =  scssRule . use [ sassLoaderIndex ] ; 
3841  if  ( typeof  sassLoader  ===  'string' )  { 
3942    scssRule . use [ sassLoaderIndex ]  =  { 
40-       loader : 'sass-loader' , 
43+       loader : sassLoader , 
4144      options : { 
42-         api : 'modern' 
45+         api : 'modern' , 
46+         sassOptions : { 
47+           includePaths : [ ] 
48+         } 
4349      } 
4450    } ; 
4551  }  else  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments