vue webpack build时关闭debug和console

 

 1.找到 webpack.prod.conf.js ,搜索 UglifyJsPlugin,添加配置

uglifyOptions: {
        compress: {
          warnings: false,
          drop_debugger: true,//关闭debug
          drop_console: true,//关闭console
        }
      },

 

 

 

posted @ 2018-04-27 11:02  Cynthia娆墨旧染  阅读(1201)  评论(0编辑  收藏  举报