From 83ae3ebfaba038f38f667f6bc444e96b0ef8e820 Mon Sep 17 00:00:00 2001 From: Will Roberts Date: Fri, 23 Jun 2017 15:54:15 +0200 Subject: [PATCH] webpack-config: export NODE_ENV=production when not in debug mode --- {{cookiecutter.app_name}}/webpack.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/{{cookiecutter.app_name}}/webpack.config.js b/{{cookiecutter.app_name}}/webpack.config.js index 3d10eaf..1d0e0d8 100644 --- a/{{cookiecutter.app_name}}/webpack.config.js +++ b/{{cookiecutter.app_name}}/webpack.config.js @@ -59,5 +59,10 @@ module.exports = { }), ].concat(debug ? [] : [ // production webpack plugins go here + new webpack.DefinePlugin({ + 'process.env': { + 'NODE_ENV': JSON.stringify('production') + } + }), ]) };