2016-09-22 19:54:57 +00:00
|
|
|
var webpack = require('webpack');
|
2016-12-19 18:03:14 +00:00
|
|
|
var base = require('./base.config');
|
2016-02-24 10:44:14 +00:00
|
|
|
var config = base('production');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// production overrides go here
|
2016-09-22 19:54:57 +00:00
|
|
|
config.plugins.push(new webpack.DefinePlugin({
|
|
|
|
|
'process.env': {
|
|
|
|
|
NODE_ENV: JSON.stringify('production'),
|
|
|
|
|
},
|
|
|
|
|
}));
|
2016-02-24 10:44:14 +00:00
|
|
|
|
2016-09-22 19:54:57 +00:00
|
|
|
// See https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.prod.js.
|
|
|
|
|
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
|
2018-02-17 12:54:06 +00:00
|
|
|
sourceMap: true,
|
|
|
|
|
|
2016-09-22 19:54:57 +00:00
|
|
|
compress: {
|
|
|
|
|
screw_ie8: true,
|
|
|
|
|
warnings: false
|
|
|
|
|
},
|
|
|
|
|
mangle: {
|
|
|
|
|
screw_ie8: true
|
|
|
|
|
},
|
|
|
|
|
output: {
|
|
|
|
|
comments: false,
|
|
|
|
|
screw_ie8: true
|
|
|
|
|
},
|
|
|
|
|
}));
|
2016-02-24 10:44:14 +00:00
|
|
|
|
|
|
|
|
module.exports = config;
|