Skip to content

Commit

Permalink
fix: Ignore foreign child compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
jantimon committed Jul 11, 2018
1 parent 0ebcd17 commit 1422664
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ class HtmlWebpackPlugin {
// Clear the cache once a new HtmlWebpackPlugin is added
childCompiler.clearCache(compiler);

compiler.hooks.compilation.tap('HtmlWebpackPlugin', (compilation) => {
// Clear the cache if the child compiler is outdated
compiler.hooks.thisCompilation.tap('HtmlWebpackPlugin', (compilation) => {
if (childCompiler.hasOutDatedTemplateCache(compilation)) {
childCompiler.clearCache(compiler);
}
Expand Down

0 comments on commit 1422664

Please sign in to comment.