From 5aba9d698b25ddc5ce02ddbcd0dcb0c196472b0a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 7 Feb 2019 14:54:12 +0000 Subject: Only include analytics on production builds --- packages/dev-tools-pages/webpack.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'packages/dev-tools-pages/webpack.config.js') diff --git a/packages/dev-tools-pages/webpack.config.js b/packages/dev-tools-pages/webpack.config.js index ef2f98cf2..ae70fd83e 100644 --- a/packages/dev-tools-pages/webpack.config.js +++ b/packages/dev-tools-pages/webpack.config.js @@ -82,7 +82,10 @@ const config = { module.exports = (_env, argv) => { let plugins = [ new CleanWebpackPlugin('public'), - ...pages.map(p => new HtmlWebpackPlugin(p)), + ...pages.map(p => { + p.environment = argv.mode; + return new HtmlWebpackPlugin(p); + }), new CopyWebpackPlugin([ { from: 'assets/crawl.html', to: 'index.html' }, { from: 'assets/fonts', to: 'fonts' }, -- cgit