|
|
@ -58,8 +58,8 @@ module.exports = {
|
|
|
|
bail: true,
|
|
|
|
bail: true,
|
|
|
|
// We generate sourcemaps in production. This is slow but gives good results.
|
|
|
|
// We generate sourcemaps in production. This is slow but gives good results.
|
|
|
|
// You can exclude the *.map files from the build during deployment.
|
|
|
|
// You can exclude the *.map files from the build during deployment.
|
|
|
|
devtool: shouldUseSourceMap ? 'nosources-source-map' : false, //正式版
|
|
|
|
// devtool: shouldUseSourceMap ? 'nosources-source-map' : false, //正式版
|
|
|
|
// devtool: shouldUseSourceMap ? 'source-map' : false,//测试版
|
|
|
|
devtool: shouldUseSourceMap ? 'source-map' : false,//测试版
|
|
|
|
// In production, we only want to load the polyfills and the app code.
|
|
|
|
// In production, we only want to load the polyfills and the app code.
|
|
|
|
entry: [require.resolve('./polyfills'), paths.appIndexJs],
|
|
|
|
entry: [require.resolve('./polyfills'), paths.appIndexJs],
|
|
|
|
output: {
|
|
|
|
output: {
|
|
|
@ -292,7 +292,7 @@ module.exports = {
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// sourceMap: shouldUseSourceMap,
|
|
|
|
// sourceMap: shouldUseSourceMap,
|
|
|
|
// }),
|
|
|
|
// }),
|
|
|
|
|
|
|
|
//正式版上线后打开去掉debuger和console
|
|
|
|
new ParallelUglifyPlugin({
|
|
|
|
new ParallelUglifyPlugin({
|
|
|
|
cacheDir: '.cache/',
|
|
|
|
cacheDir: '.cache/',
|
|
|
|
uglifyJS:{
|
|
|
|
uglifyJS:{
|
|
|
@ -301,8 +301,8 @@ module.exports = {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
warnings: false,
|
|
|
|
warnings: false,
|
|
|
|
compress: {
|
|
|
|
compress: {
|
|
|
|
drop_debugger: true,
|
|
|
|
drop_debugger: false,
|
|
|
|
drop_console: true
|
|
|
|
drop_console: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|