From 9cfad2d8492a0d537b6d97d9bd72751d7e949d81 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 4 Mar 2018 21:56:59 -0500 Subject: [PATCH] move DefinePlugin to new webpack config location --- webpack/client.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webpack/client.config.js b/webpack/client.config.js index 6095c1c..b8798da 100644 --- a/webpack/client.config.js +++ b/webpack/client.config.js @@ -29,7 +29,11 @@ module.exports = { }, mode, plugins: [ - isDev && new webpack.HotModuleReplacementPlugin() + isDev && new webpack.HotModuleReplacementPlugin(), + new webpack.DefinePlugin({ + 'process.browser': true, + 'process.env.NODE_ENV': JSON.stringify(mode) + }), ].filter(Boolean), devtool: isDev && 'inline-source-map' };