1.0.2 • Published 3 years ago

@mara/babel-plugin-console-prefix v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

@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]
      }
    ]
  ]
}
1.0.2

3 years ago