Skip to content

Commit

Permalink
webpack: Add production build with DefinePlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nkprince007 committed Nov 12, 2017
1 parent cb87769 commit 3b8281c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions webpack.config.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ import webpack from 'webpack';

clientConfig.name = 'frontend build';
clientConfig.plugins = [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
minimize: true
})
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new webpack.optimize.UglifyJsPlugin()
];
delete clientConfig.devServer;
delete clientConfig.devtool;
Expand Down

0 comments on commit 3b8281c

Please sign in to comment.