chore(webpack): Set NODE_ENV to production

This enables production builds for React

Change-Type: patch
This commit is contained in:
Jonas Hermsmeier 2018-05-18 19:11:22 +02:00
parent d6cc182da2
commit b4f2bc1cb3
No known key found for this signature in database
GPG Key ID: 1B870F801A0CEE9F

View File

@ -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')
})
]
}