babel-plugin-lf-debug
v1.0.4
Published
babel插件,用于不同环境的的测试输出
Downloads
8
Readme
install
yarn add babel-plugin-lf-debug -D
使用
- 插件使用
{
"plugins": [
["babel-plugin-lf-debug", {
"useDebug": true
}]
]
}
- 编写代码
console.log('before')
if(DEBUG){
console.log('23')
let a = 2
let b = 3
console.log("a+b", a+b)
}
- 兼容eslint
//src/.eslintrc.js
module.exports = {
globals: {
DEBUG: true,
},
};