2.0.2 • Published 4 years ago

chen-babel-plugin-transform-remove-console v2.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

chen-babel-plugin-transform-remove-console

帮助开发者清除代码中所有符合条件的 console.* 语句的一个 babel-plugin

安装

yarn add chen-babel-plugin-transform-remove-console

使用

  • 在 antdProV4 中使用
 // config/config.ts
 export default defineConfig({
   extraBabelPlugins: [
     ['module:chen-babel-plugin-transform-remove-console',{
       exclude:['warn','error']
     }],
   ],
   ...
   ... 
 })
  • 在 .babelrc 中使用
{
  "plugins": [
    ["module:chen-babel-plugin-transform-remove-console",{
      "exclude": ["error", "warn"]
    }]
  ]
}

配置项

  • 配置项为exclude(排除)参数,它的值必须为一个数组,否则配置无效
  • 值为console.*中的*
{
 "exclude": ["error", "warn","time","log","clear",...so on]
}
2.0.2

4 years ago

2.0.1

4 years ago

2.0.1-0

4 years ago

2.0.0

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago