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