From b4f2bc1cb391d45c2f5aac471851e9398a5675f7 Mon Sep 17 00:00:00 2001 From: Jonas Hermsmeier Date: Fri, 18 May 2018 19:11:22 +0200 Subject: [PATCH] chore(webpack): Set NODE_ENV to production This enables production builds for React Change-Type: patch --- webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 1b7a875e..26cbbaa6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,6 +16,7 @@ 'use strict' +const webpack = require('webpack') const path = require('path') const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin') const nodeExternals = require('webpack-node-externals') @@ -89,6 +90,9 @@ module.exports = { plugins: [ new SimpleProgressWebpackPlugin({ format: process.env.WEBPACK_PROGRESS || 'verbose' + }), + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production') }) ] }