We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de0dc95 commit 3e397bdCopy full SHA for 3e397bd
1 file changed
src/loader.js
@@ -59,7 +59,9 @@ export function pitch (request) {
59
const workerCompiler = this._compilation.createChildCompiler(NAME, workerOptions, plugins);
60
workerCompiler.context = this._compiler.context;
61
62
- if (pluginOptions.target && /\bnode\b/.test(pluginOptions.target)) {
+ const target = pluginOptions.target || compilerOptions.target
63
+
64
+ if (target && /\bnode\b/.test(target)) {
65
new NodeTargetPlugin().apply(workerCompiler);
66
}
67
(new WebWorkerTemplatePlugin(workerOptions)).apply(workerCompiler);
0 commit comments