remove-console-babel-plugin
v0.0.8
Published
Ts-based babel plugin that removes the compiled console.*
Downloads
5
Readme
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
| option | description | default |
| ------- | ---------- | --------- |
| removeConsole
| Remove the console after it opens | true
|
| exclude
| Exclude the console method that cannot be removed | no setting all remove |