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) {
6969
7070 if ( options . emitCss && css . code ) {
7171 const resource = posixify ( compileOptions . filename ) ;
72- const cssPath = options . inlineCss
72+ const threadLoaderUsed = this . emitFile === undefined ;
73+ const cssPath = threadLoaderUsed
7374 ? `${ resource } .css`
7475 : `${ resource } .${ index ++ } .css` ;
75- const cssQuery = options . inlineCss
76+ const cssQuery = threadLoaderUsed
7677 ? `cssData=${ Buffer . from ( css . code ) . toString ( 'base64' ) } `
7778 : `cssPath=${ cssPath } ` ;
7879 css . code += '\n/*# sourceMappingURL=' + css . map . toUrl ( ) + '*/' ;
7980 js . code += `\nimport '${ cssPath } !=!svelte-loader?${ cssQuery } !${ resource } '\n;` ;
80- if ( ! options . inlineCss )
81+ if ( ! threadLoaderUsed )
8182 virtualModules . set ( cssPath , css . code ) ;
8283 }
8384
You can’t perform that action at this time.
0 commit comments