From 1d59e9a71ddba1429168c42569a7bd9bdd363f4f Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Thu, 15 Oct 2020 14:43:50 +0200 Subject: [PATCH] feat: use thisCompilation in child compiler for faster builds see also https://github.com/webpack/webpack/pull/11704 --- lib/child-compiler.js | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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",