1.0.2 • Published 1 year ago

babel-plugin-console-happice v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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",
        },
      },
    ],
  ],
};
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago