diff --git a/examples/template-parameters/webpack.config.js b/examples/template-parameters/webpack.config.js index 55a4aa93..535562b2 100755 --- a/examples/template-parameters/webpack.config.js +++ b/examples/template-parameters/webpack.config.js @@ -11,8 +11,19 @@ module.exports = { }, plugins: [ new HtmlWebpackPlugin({ - templateParameters: { - 'foo': 'bar' + // NOTE if you pass plain object it will be passed as is. no default values there, so be aware! + // for implementation detail, please see index.js and search for "userOptions" variable + templateParameters: (compilation, assets, assetTags, options) => { + return { + compilation, + webpackConfig: compilation.options, + htmlWebpackPlugin: { + tags: assetTags, + files: assets, + options + }, + 'foo': 'bar' + }; }, template: 'index.ejs' })