vue.config.js 548 B

1234567891011
  1. module.exports = {
  2. productionSourceMap: false, // 生产打包时不输出map文件,增加打包速度
  3. configureWebpack: config => {
  4. if (process.env.NODE_ENV === 'production') {
  5. config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
  6. config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
  7. config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true
  8. config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log']
  9. }
  10. }
  11. }