babel-plugin-lf-debug

1.0.4 • Public • Published

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,
  },
};

Readme

Keywords

Package Sidebar

Install

npm i babel-plugin-lf-debug

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

2.15 kB

Total Files

5

Last publish

Collaborators

  • andbohemian