Skip to content

Commit

Permalink
Use production build of react when deployed (fixes getredash#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Short authored and jezdez committed Mar 25, 2019
1 parent 0702adc commit f8a596d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ if (process.env.DEV_SERVER_HOST) {
config.devServer.host = process.env.DEV_SERVER_HOST;
}

if (isProduction) {
config.plugins.push(
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
})
);
}

if (process.env.BUNDLE_ANALYZER) {
config.plugins.push(new BundleAnalyzerPlugin());
}
Expand Down

0 comments on commit f8a596d

Please sign in to comment.