Authored by 沈志敏

webpack2

@@ -110,7 +110,7 @@ module.exports = (env) => { @@ -110,7 +110,7 @@ module.exports = (env) => {
110 }, { 110 }, {
111 test: /\.js$/, 111 test: /\.js$/,
112 exclude: [/node_modules/], 112 exclude: [/node_modules/],
113 - use: env === 'dev' ? ['babel-loader'] : [{ 113 + use: [{
114 loader: 'happypack/loader?id=js' 114 loader: 'happypack/loader?id=js'
115 }] 115 }]
116 }, { 116 }, {
@@ -118,7 +118,7 @@ module.exports = (env) => { @@ -118,7 +118,7 @@ module.exports = (env) => {
118 use: cssLoader(env, 'css') 118 use: cssLoader(env, 'css')
119 }, { 119 }, {
120 test: /\.hbs$/, 120 test: /\.hbs$/,
121 - use: env === 'dev' ? [hbsLoader] : [{ 121 + use: [{
122 loader: 'happypack/loader?id=hbs' 122 loader: 'happypack/loader?id=hbs'
123 }] 123 }]
124 }] 124 }]
@@ -29,11 +29,6 @@ _.mergeWith(baseConfig, { @@ -29,11 +29,6 @@ _.mergeWith(baseConfig, {
29 NODE_ENV: '"production"' 29 NODE_ENV: '"production"'
30 } 30 }
31 }), 31 }),
32 - new webpack.optimize.UglifyJsPlugin({  
33 - compress: {  
34 - warnings: false  
35 - }  
36 - }),  
37 new UglifyJsParallelPlugin({ 32 new UglifyJsParallelPlugin({
38 workers: os.cpus().length, 33 workers: os.cpus().length,
39 compress: { 34 compress: {