Added webpack build config

This commit is contained in:
euvl
2016-11-14 15:46:35 +00:00
parent 0a1017bfc4
commit a13056c608
12 changed files with 102 additions and 56 deletions

18
webpack.prod.config.js Normal file
View File

@@ -0,0 +1,18 @@
var webpack = require('webpack');
var config = require('./webpack.base.config');
config.plugins = (config.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurenceOrderPlugin()
]);
module.exports = config;