Merge pull request #34 from L1uD0ngq1/master

Webpack createChildCompiler api will drop SingleEntryPlugin complication hook
This commit is contained in:
Alexandru Dima 2018-09-13 12:02:47 +02:00 committed by GitHub
commit f9243c19e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,9 +15,10 @@ function getCompilerHook(compiler, {id, entry, filename, chunkFilename, plugins}
const childCompiler = compilation.createChildCompiler(id, outputOptions, [ const childCompiler = compilation.createChildCompiler(id, outputOptions, [
new WebWorkerTemplatePlugin(), new WebWorkerTemplatePlugin(),
new LoaderTargetPlugin('webworker'), new LoaderTargetPlugin('webworker'),
new SingleEntryPlugin(compiler.context, entry, 'main'),
]); ]);
new SingleEntryPlugin(compiler.context, entry, 'main').apply(childCompiler);
plugins.forEach((plugin) => plugin.apply(childCompiler)); plugins.forEach((plugin) => plugin.apply(childCompiler));
childCompiler.runAsChild(callback); childCompiler.runAsChild(callback);
} }
} }