From 4fca5965315c49f6706812d9fdf6c7284d23d75b Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Wed, 14 Oct 2020 14:12:47 +0200 Subject: [PATCH] fix: use compiler.hooks.initialize to ensure that the correct compiler configuration is used --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index da16f67b..26368c7e 100644 --- a/index.js +++ b/index.js @@ -79,7 +79,10 @@ class HtmlWebpackPlugin { } apply (compiler) { - hookIntoCompiler(compiler, this.options, this); + // Wait for configuration preset plugions to apply all configure webpack defaults + compiler.hooks.initialize.tap('HtmlWebpackPlugin', () => { + hookIntoCompiler(compiler, this.options, this); + }); } /**