0.0.8 • Published 2 years ago

remove-console-babel-plugin v0.0.8

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

remove-console-babel-plugin

A lightweight babel plug-in for console remove, Remove/replace console.* code through babel -> AST procedure

Installation

  npm install  remove-console-babel-plugin --save-dev
  yarn  add  remove-console-babel-plugin --dev

Usage

   //babel.config.js
    const removeConsoleBabelPlugin = require("remove-console-babel-plugin");
    const plugins = [
        [
            removeConsoleBabelPlugin,
            {
                noCloseConsole: false
            }
        ]
    ];
    module.exports = {
        // ...other code
        plugins,
    };

Options

optiondescriptiondefault
removeConsoleRemove the console after it openstrue
excludeExclude the console method that cannot be removedno setting all remove

参考文献

babel插件编写中文文档

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago