Skip to content

Commit

Permalink
fix: use compiler.hooks.initialize to ensure that the correct compile…
Browse files Browse the repository at this point in the history
…r configuration is used
  • Loading branch information
jantimon committed Jan 20, 2021
1 parent 9827a01 commit 4fca596
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

/**
Expand Down

0 comments on commit 4fca596

Please sign in to comment.