From 9bc0fb0bd126a4063f7d94c14ac8781b50eeb9c8 Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Sat, 9 Dec 2017 18:00:45 +0800 Subject: [PATCH] Fix __DEV__ value for minified build --- webpack.config.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index f971c25..f80773e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -44,7 +44,14 @@ module.exports = [ libraryTarget: 'umd' }, module: modules, - plugins: plugins.concat([new UglifyJSPlugin(), new webpack.BannerPlugin(banner)]) + plugins: [ + new webpack.DefinePlugin({ + '__DEV__': false, + '__VERSION__': JSON.stringify(pkg.version) + }), + new UglifyJSPlugin(), + new webpack.BannerPlugin(banner) + ] }, { entry: './src/renderer/RefTestRenderer.js',