diff --git a/lib/child-compiler.js b/lib/child-compiler.js index 72590925..365db42a 100644 --- a/lib/child-compiler.js +++ b/lib/child-compiler.js @@ -115,7 +115,7 @@ class HtmlWebpackChildCompiler { this.compilationStartedTimestamp = new Date().getTime(); this.compilationPromise = new Promise((resolve, reject) => { const extractedAssets = []; - childCompiler.hooks.compilation.tap('HtmlWebpackPlugin', (compilation) => { + childCompiler.hooks.thisCompilation.tap('HtmlWebpackPlugin', (compilation) => { compilation.hooks.processAssets.tap( { name: 'HtmlWebpackPlugin', diff --git a/package.json b/package.json index a44df929..cdbd05bb 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "standard-version": "9.0.0", "style-loader": "0.23.1", "typescript": "4.0.3", - "webpack": "5.1.0", + "webpack": "5.1.2", "webpack-recompilation-simulator": "3.2.0" }, "dependencies": { @@ -58,7 +58,7 @@ "tapable": "2.0.0" }, "peerDependencies": { - "webpack": "^5.1.0" + "webpack": "^5.1.2" }, "keywords": [ "webpack",