Skip to content

Commit 4fca596

Browse files
committed
fix: use compiler.hooks.initialize to ensure that the correct compiler configuration is used
1 parent 9827a01 commit 4fca596

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ class HtmlWebpackPlugin {
7979
}
8080

8181
apply (compiler) {
82-
hookIntoCompiler(compiler, this.options, this);
82+
// Wait for configuration preset plugions to apply all configure webpack defaults
83+
compiler.hooks.initialize.tap('HtmlWebpackPlugin', () => {
84+
hookIntoCompiler(compiler, this.options, this);
85+
});
8386
}
8487

8588
/**

0 commit comments

Comments
 (0)