From ed64a6b35fe9cdbc610e9b766700f3b2fc2b8e4c Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Mon, 2 Nov 2020 09:22:34 +0100 Subject: [PATCH] fix: use EntryPlugin instead of the deprecated SingleEntryPlugin --- lib/child-compiler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/child-compiler.js b/lib/child-compiler.js index 4e553b22..70edcddc 100644 --- a/lib/child-compiler.js +++ b/lib/child-compiler.js @@ -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. @@ -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();