Skip to content

Commit

Permalink
fix: use EntryPlugin instead of the deprecated SingleEntryPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jantimon committed Jan 20, 2021
1 parent 6b3d087 commit ed64a6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/child-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class HtmlWebpackChildCompiler {
const NodeTemplatePlugin = webpack.node.NodeTemplatePlugin;
const NodeTargetPlugin = webpack.node.NodeTargetPlugin;
const LoaderTargetPlugin = webpack.LoaderTargetPlugin;
const SingleEntryPlugin = webpack.SingleEntryPlugin;
const EntryPlugin = webpack.EntryPlugin;

// To prevent multiple compilations for the same template
// the compilation is cached in a promise.
Expand Down Expand Up @@ -116,7 +116,7 @@ class HtmlWebpackChildCompiler {

// Add all templates
this.templates.forEach((template, index) => {
new SingleEntryPlugin(childCompiler.context, template, `HtmlWebpackPlugin_${index}-${this.id}`).apply(childCompiler);
new EntryPlugin(childCompiler.context, template, `HtmlWebpackPlugin_${index}-${this.id}`).apply(childCompiler);
});

this.compilationStartedTimestamp = new Date().getTime();
Expand Down

0 comments on commit ed64a6b

Please sign in to comment.