Skip to content

Commit 1422664

Browse files
committedJul 11, 2018
fix: Ignore foreign child compilers
1 parent 0ebcd17 commit 1422664

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ class HtmlWebpackPlugin {
9797
// Clear the cache once a new HtmlWebpackPlugin is added
9898
childCompiler.clearCache(compiler);
9999

100-
compiler.hooks.compilation.tap('HtmlWebpackPlugin', (compilation) => {
100+
// Clear the cache if the child compiler is outdated
101+
compiler.hooks.thisCompilation.tap('HtmlWebpackPlugin', (compilation) => {
101102
if (childCompiler.hasOutDatedTemplateCache(compilation)) {
102103
childCompiler.clearCache(compiler);
103104
}

0 commit comments

Comments
 (0)
Please sign in to comment.