0.0.7 • Published 2 years ago

webpack-clean-console-plugin v0.0.7

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

webpack-clean-console-plugin Introduction

A lightweight webpack plug-in for console remove, small and dependency free (only one file), supports both webpack4.x and webpack5.x

warning

advantages

  • support webpack4.xwebpack5.x

  • small volume(1.6kb)

  • Without dependency

Installation

 npm install webpack-clean-console-plugin --save-dev
 yarn  add  webpack-clean-console-plugin --dev

Usage

// webpack.config.js
const WebpackCleanConsolePlugin = require("webpack-clean-console-plugin");

// case 1  include method
module.exports = {
  // ...other code
  plugins: [new WebpackCleanConsolePlugin({ include: ["log", "info"] })],
};

// case 2 all console method
module.exports = {
  // ...other code
  plugins: [new WebpackCleanConsolePlugin({ include: ["*"] })],
};

More webpack4/5 example reference tests/webpack4-testtests/webpack5-test

Options

optiondescriptiondefaultoptions
includeAn array of console methods that you want to remove.['log']all ["*"] or ['log', 'info','error','warn','debug']...
openRemoveConsoleWhether or not open consoletruetruefalse
0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago