关于vue打包(时常更新)

1.生产环境去除console.log
build 文件夹下webpack.prod.conf.js文件中添加

new UglifyJsPlugin({
      uglifyOptions: {
        compress: {
          warnings: false,
          drop_debugger: true,
          drop_console: true
        }
      },
      sourceMap: config.build.productionSourceMap,
      parallel: true
    }),

你可能感兴趣的:(关于vue打包(时常更新))