diff --git a/index.js b/index.js index f98abce2..59d0c93a 100644 --- a/index.js +++ b/index.js @@ -250,7 +250,7 @@ HtmlWebpackPlugin.prototype.executeTemplate = function (templateFunction, chunks return Promise.resolve() // Template processing .then(function () { - var templateParams = { + var templateParams = _.extend(self.options.templateParams || {}, { compilation: compilation, webpack: compilation.getStats().toJson(), webpackConfig: compilation.options, @@ -258,7 +258,7 @@ HtmlWebpackPlugin.prototype.executeTemplate = function (templateFunction, chunks files: assets, options: self.options } - }; + }); var html = ''; try { html = templateFunction(templateParams);