diff --git a/webintroduce/build/webpack.prod.conf.js b/webintroduce/build/webpack.prod.conf.js index d9f99f6..9a39f10 100644 --- a/webintroduce/build/webpack.prod.conf.js +++ b/webintroduce/build/webpack.prod.conf.js @@ -35,7 +35,10 @@ const webpackConfig = merge(baseWebpackConfig, { new UglifyJsPlugin({ uglifyOptions: { compress: { - warnings: false + warnings: false, + drop_debugger: true,//console + drop_console: true, + pure_funcs: ['console.log']//移除console } }, sourceMap: config.build.productionSourceMap, @@ -46,7 +49,7 @@ const webpackConfig = merge(baseWebpackConfig, { filename: utils.assetsPath('css/[name].[contenthash].css'), // Setting the following option to `false` will not extract CSS from codesplit chunks. // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. - // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, + // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 allChunks: true, }),