We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14c0824 commit 94773b4Copy full SHA for 94773b4
index.js
@@ -69,15 +69,16 @@ module.exports = function(source, map) {
69
70
if (options.emitCss && css.code) {
71
const resource = posixify(compileOptions.filename);
72
- const cssPath = options.inlineCss
+ const threadLoaderUsed = this.emitFile === undefined;
73
+ const cssPath = threadLoaderUsed
74
? `${resource}.css`
75
: `${resource}.${index++}.css`;
- const cssQuery = options.inlineCss
76
+ const cssQuery = threadLoaderUsed
77
? `cssData=${Buffer.from(css.code).toString('base64')}`
78
: `cssPath=${cssPath}`;
79
css.code += '\n/*# sourceMappingURL=' + css.map.toUrl() + '*/';
80
js.code += `\nimport '${cssPath}!=!svelte-loader?${cssQuery}!${resource}'\n;`;
- if (!options.inlineCss)
81
+ if (!threadLoaderUsed)
82
virtualModules.set(cssPath, css.code);
83
}
84
0 commit comments