File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -221,17 +221,12 @@ class MiniHtmlWebpackPlugin implements WebpackPluginInstance {
221221
222222 public apply ( compiler : webpack . Compiler ) {
223223 const pluginName = 'MiniHtmlWebpackPlugin' ;
224- let registeredAlready = false ;
225224
226225 if ( isWebpack4 ( ) ) {
227226 // @ts -ignore: Ignore for webpack 4 due to different typing
228227 compiler . hooks . emit . tapAsync ( pluginName , this . webpack4plugin ) ;
229228 } else {
230- compiler . hooks . compilation . tap ( pluginName , ( compilation ) => {
231- if ( registeredAlready ) {
232- return ;
233- }
234-
229+ compiler . hooks . thisCompilation . tap ( pluginName , ( compilation ) => {
235230 compilation . hooks . processAssets . tapPromise (
236231 {
237232 name : pluginName ,
@@ -240,8 +235,6 @@ class MiniHtmlWebpackPlugin implements WebpackPluginInstance {
240235 } ,
241236 ( ) => this . webpack5plugin ( compilation )
242237 ) ;
243-
244- registeredAlready = true ;
245238 } ) ;
246239 }
247240 }
You can’t perform that action at this time.
0 commit comments