diff --git a/plugins/AddWorkerEntryPointPlugin.js b/plugins/AddWorkerEntryPointPlugin.js index 4d7e4aa9..d935c2e0 100644 --- a/plugins/AddWorkerEntryPointPlugin.js +++ b/plugins/AddWorkerEntryPointPlugin.js @@ -15,9 +15,10 @@ function getCompilerHook(compiler, {id, entry, filename, chunkFilename, plugins} const childCompiler = compilation.createChildCompiler(id, outputOptions, [ new WebWorkerTemplatePlugin(), new LoaderTargetPlugin('webworker'), - new SingleEntryPlugin(compiler.context, entry, 'main'), ]); + new SingleEntryPlugin(compiler.context, entry, 'main').apply(childCompiler); plugins.forEach((plugin) => plugin.apply(childCompiler)); + childCompiler.runAsChild(callback); } }