babel-plugin-code-cleaner
v0.1.3
Published
babel code cleaner, removes specified console & debugger debugging code
Downloads
2
Maintainers
Readme
babel-plugin-code-cleaner
babel代码清洁工,删除指定的调试代码:console
& debugger
插件安装
npm install babel-plugin-code-cleaner -D
babel配置
babel.config.js
{
"plugins": ["babel-plugin-code-cleaner"]
}
添加配置参数
{
"plugins": [["code-cleaner", {
"env": "production", // 始终执行cleaner
"ignoreDebug": true, // 忽略 debugger的清除
"commentWord": "@ignore-code-cleaner" // 默认值
}]]
}