File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,16 @@ module.exports = function(source, map) {
6565
6666		if  ( options . emitCss  &&  css . code )  { 
6767			const  resource  =  posixify ( compileOptions . filename ) ; 
68- 			const  cssPath  =  options . inlineCss 
68+ 			const  threadLoaderUsed  =  this . emitFile  ===  undefined ; 
69+ 			const  cssPath  =  threadLoaderUsed 
6970				? `${ resource }  
7071				: `${ resource } ${ index ++ }  ; 
71- 			const  cssQuery  =  options . inlineCss 
72+ 			const  cssQuery  =  threadLoaderUsed 
7273				? `cssData=${ Buffer . from ( css . code ) . toString ( 'base64' ) }  
7374				: `cssPath=${ cssPath }  ; 
7475			css . code  +=  '\n/*# sourceMappingURL='  +  css . map . toUrl ( )  +  '*/' ; 
7576			js . code  +=  `\nimport '${ cssPath } ${ cssQuery } ${ resource }  ; 
76- 			if  ( ! options . inlineCss ) 
77+ 			if  ( ! threadLoaderUsed ) 
7778				virtualModules . set ( cssPath ,  css . code ) ; 
7879		} 
7980
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments