We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48f1746 commit f5d5285Copy full SHA for f5d5285
index.js
@@ -65,15 +65,16 @@ module.exports = function(source, map) {
65
66
if (options.emitCss && css.code) {
67
const resource = posixify(compileOptions.filename);
68
- const cssPath = options.inlineCss
+ const threadLoaderUsed = this.emitFile === undefined;
69
+ const cssPath = threadLoaderUsed
70
? `${resource}.css`
71
: `${resource}.${index++}.css`;
- const cssQuery = options.inlineCss
72
+ const cssQuery = threadLoaderUsed
73
? `cssData=${Buffer.from(css.code).toString('base64')}`
74
: `cssPath=${cssPath}`;
75
css.code += '\n/*# sourceMappingURL=' + css.map.toUrl() + '*/';
76
js.code += `\nimport '${cssPath}!=!svelte-loader?${cssQuery}!${resource}'\n;`;
- if (!options.inlineCss)
77
+ if (!threadLoaderUsed)
78
virtualModules.set(cssPath, css.code);
79
}
80
0 commit comments