...
|
...
|
@@ -2,7 +2,6 @@ |
|
|
|
|
|
const path = require('path');
|
|
|
const shelljs = require('shelljs');
|
|
|
const webpack = require('webpack');
|
|
|
const merge = require('webpack-merge');
|
|
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
|
const config = require('../../package.json');
|
...
|
...
|
@@ -18,25 +17,11 @@ shelljs.cp('-R', path.join(__dirname, './dll/*'), distDir); |
|
|
baseConfig = baseConfig('pro');
|
|
|
|
|
|
module.exports = merge(baseConfig, {
|
|
|
mode: 'production',
|
|
|
output: {
|
|
|
path: distDir
|
|
|
},
|
|
|
plugins: [
|
|
|
new ExtractTextPlugin('[name].css'),
|
|
|
new webpack.DefinePlugin({
|
|
|
'process.env': {
|
|
|
NODE_ENV: '"production"'
|
|
|
}
|
|
|
}),
|
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
|
parallel: true,
|
|
|
sourceMap: true,
|
|
|
uglifyOptions: {
|
|
|
compress: {
|
|
|
warnings: false
|
|
|
},
|
|
|
comments: false
|
|
|
}
|
|
|
})
|
|
|
new ExtractTextPlugin('[name].css')
|
|
|
]
|
|
|
}); |
...
|
...
|
|