Skip to content

Commit

Permalink
Merge pull request balena-io#2416 from resin-io/enable-production-react
Browse files Browse the repository at this point in the history
chore(webpack): Set NODE_ENV to production for React / WebPack
  • Loading branch information
jhermsmeier committed Jul 10, 2018
2 parents d6cc182 + b4f2bc1 commit 1fb420c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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')
})
]
}

0 comments on commit 1fb420c

Please sign in to comment.