Authored by 陈峰

Merge branch 'master' into release/1.0

... ... @@ -2,6 +2,8 @@ const webpack = require('webpack');
var path = require('path');
let utils = require('./utils');
let config = require('./config')
const os = require('os');
const UglifyJsparallelPlugin = require('webpack-uglify-parallel');
const AssetsPlugin = require('assets-webpack-plugin');
let ExtractTextPlugin = require('extract-text-webpack-plugin');
... ... @@ -62,10 +64,13 @@ module.exports = {
new webpack.DefinePlugin({
'process.env': config.build.env
}),
new webpack.optimize.UglifyJsPlugin({
new UglifyJsparallelPlugin({
workers: os.cpus().length,
mangle: true,
compress: {
warnings: false
},
comments: false,
sourceMap: true
}),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
... ...
... ... @@ -7,7 +7,7 @@
"dev": "nodemon --watch server server/app.js",
"static": "node ./build/dev-server.js",
"dist": "node ./build/build.js",
"build": "npm run build:dll && node ./build/build.js",
"build": "npm run build:dll --production && node ./build/build.js",
"build:dll": "rimraf build/dll && webpack --config build/webpack.dll.conf.js",
"lint-js": "eslint --ext .js,.vue -c .eslintrc --cache app server",
"lint-css": "stylelint --syntax scss --extract --config .stylelintrc **/*.vue",
... ...