From 7005a557529bee948c5ef0a1b8b44a1a41a28417 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Thu, 22 Mar 2018 19:01:58 +0100 Subject: [PATCH] fix: Remove compilation.getStats() call for performance reasons BREAKING CHANGE: Template variable webpack was removed --- index.js | 1 - spec/BasicSpec.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 5d6d28d0..31d086ab 100644 --- a/index.js +++ b/index.js @@ -719,7 +719,6 @@ function trainCaseToCamelCase (word) { function templateParametersGenerator (compilation, assets, options) { return { compilation: compilation, - webpack: compilation.getStats().toJson(), webpackConfig: compilation.options, htmlWebpackPlugin: { files: assets, diff --git a/spec/BasicSpec.js b/spec/BasicSpec.js index 20949fb5..27335deb 100644 --- a/spec/BasicSpec.js +++ b/spec/BasicSpec.js @@ -1590,7 +1590,7 @@ describe('HtmlWebpackPlugin', function () { inject: false }) ] - }, ['templateParams keys: "compilation,webpack,webpackConfig,htmlWebpackPlugin"'], null, done); + }, ['templateParams keys: "compilation,webpackConfig,htmlWebpackPlugin"'], null, done); }); it('should allow to disable template parameters', function (done) {