Authored by ccbikai(👎🏻🍜)

Merge remote-tracking branch 'origin/feature/uglify' into release/5.3

... ... @@ -90,6 +90,7 @@
"webpack": "^1.13.2",
"webpack-dev-server": "^1.16.2",
"webpack-stream": "^3.1.0",
"webpack-uglify-parallel": "^0.1.3",
"yoho-cookie": "^1.2.0",
"yoho-fastclick": "^1.0.6",
"yoho-hammer": "^2.0.7",
... ...
... ... @@ -10,6 +10,7 @@ const path = require('path');
const gulp = require('gulp');
const gutil = require('gulp-util');
const ftp = require('gulp-ftp');
const os = require('os');
const postcss = require('gulp-postcss');
const sourcemaps = require('gulp-sourcemaps');
... ... @@ -19,6 +20,7 @@ const scss = require('postcss-scss');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const UglifyJsParallelPlugin = require('webpack-uglify-parallel');
const webpackConfig = require('./webpack.config.js');
... ... @@ -275,10 +277,8 @@ gulp.task('webpack', ['assets'], (done) => {
'process.env': {
NODE_ENV: '"production"'
}
}), new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}), new UglifyJsParallelPlugin({
workers: os.cpus().length
}));
webpack(proConfig, (err, stats) => {
... ...