1.0.2 ⢠Published 1 year ago
babel-plugin-console-happice v1.0.2
Babel-Plugin-Console
Description
A plugin to optimize console statementš„°
Now the plugin can handle Literal, but it cant handle Identifier and Function caller.
The console statement will be deleted in production, but they will be add color and location in development
Start
npm install babel-plugin-console-happice
How to use
/** babel.config.js */
const BabelConsolePlugin = require("babel-plugin-console-happice/lib");
module.exports = {
plugins: [
[
BabelConsolePlugin,
{
env: process.env.NODE_ENV,
removeMethods: ["log", "dir", "warn"],
customStyle: {
warn: "#24292E",
},
},
],
],
};