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 @@ -69,15 +69,16 @@ module.exports = function(source, map) {
69
69
70
70
if ( options . emitCss && css . code ) {
71
71
const resource = posixify ( compileOptions . filename ) ;
72
- const cssPath = options . inlineCss
72
+ const threadLoaderUsed = this . emitFile === undefined ;
73
+ const cssPath = threadLoaderUsed
73
74
? `${ resource } .css`
74
75
: `${ resource } .${ index ++ } .css` ;
75
- const cssQuery = options . inlineCss
76
+ const cssQuery = threadLoaderUsed
76
77
? `cssData=${ Buffer . from ( css . code ) . toString ( 'base64' ) } `
77
78
: `cssPath=${ cssPath } ` ;
78
79
css . code += '\n/*# sourceMappingURL=' + css . map . toUrl ( ) + '*/' ;
79
80
js . code += `\nimport '${ cssPath } !=!svelte-loader?${ cssQuery } !${ resource } '\n;` ;
80
- if ( ! options . inlineCss )
81
+ if ( ! threadLoaderUsed )
81
82
virtualModules . set ( cssPath , css . code ) ;
82
83
}
83
84
You can’t perform that action at this time.
0 commit comments