JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

webpack配置删除console

发布时间 2023-10-09 14:43:27作者: IT丶Hatcher

1.删除所有的console.log

vue.config.js:

module.exports = defineConfig({
    configureWebpack: (config) => {
      // 删除console
      config.optimization.minimizer[0].options.minimizer.options.compress = Object.assign(
        config.optimization.minimizer[0].options.minimizer.options.compress,
        {
          drop_console: true
        }
      );
  }
})
    本栏目推荐文章
  • JS常用工具:Webpack 和 JShaman分别有什么用?
  • 安装npm install报错npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://registry.npmjs.org/webpack-subresource-integrity failed, reason
  • vite_打包去除console
  • seata-server-1.8.0 | Could not resolve placeholder 'console.user.username' in value "${console.user.username}"  | "${seata.security.secretKey}"
  • 使用VSCode调试.Net Framework Console 工程
  • mysql安装:mysqld --initialize -console无反应解决方法(其一)
  • webpack优化,用lodash-es代替lodash
  • 【全志T113】修改console uart端口
  • webpack指南(代码分离)
  • vue&webpack - vue2版本webpack脚手架配置梳理
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们