@mara/babel-plugin-console-prefix

1.0.2 • Public • Published

@mara/babel-plugin-console-prefix

babel-loader 的插件,给项目的 console 增加前缀

Install

Using npm:

npm install --save-dev @mara/babel-plugin-console-prefix

or using yarn:

yarn add @mara/babel-plugin-console-prefix --dev

Usage

const BabelPluginConsolePrefix = require('@mara/babel-plugin-console-prefix')

{
  plugins: [
    [
      BabelPluginConsolePrefix,
      {
        // customPrefix: 'prefix',  // 自定义前缀,开发组件时建议将该值设置为组件名称
        exclude: ['sncLog'], // 排除某些文件,会用正则过滤
        showLocation: false // 是否显示行号 [index.js 4:13]
      }
    ]
  ]
}

Package Sidebar

Install

npm i @mara/babel-plugin-console-prefix

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

4.55 kB

Total Files

3

Last publish

Collaborators

  • holmeshaw
  • xiaojue
  • lq0611
  • vv314
  • happybang
  • limy1997
  • tingyu3