1.0.4 • Published 2 years ago

babel-plugin-lf-debug v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

install

yarn add babel-plugin-lf-debug -D

使用

  1. 插件使用
{
  "plugins": [
    ["babel-plugin-lf-debug", {
      "useDebug": true
    }]
  ]
}
  1. 编写代码
console.log('before')
if(DEBUG){
  console.log('23')
  let a  = 2
  let b = 3
  console.log("a+b", a+b)
}
  1. 兼容eslint
//src/.eslintrc.js
module.exports = {
  globals: {
    DEBUG: true,
  },
};