0.2.0 • Published 3 years ago

remove-console-webpack-plugin v0.2.0

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

remove-console-webpack-plugin

A light webpack plugin to remove console.* in your JS code without any dependencies.

Example

In

console.log("log test"); // by default
console.error("error test"); // need to configure

Out

Installation

npm install remove-console-webpack-plugin --save-dev

Usage

// webpack.config.js
const RemoveConsolePlugin = require('remove-console-webpack-plugin')

// demo1: remove console.log by default
module.exports = {
  // other code ...
  plugins: [
    new RemoveConsolePlugin()
  ]
}

// demo2: remove console.log, console.warn, console.error 
module.exports = {
  // other code ...
  plugins: [
    new RemoveConsolePlugin({ include: ['log', 'warn', 'error'] })
  ]
}

// demo3: remove console.*
module.exports = {
  // other code ...
  plugins: [
    new RemoveConsolePlugin({ include: ['*'] })
  ]
}

Options

optiondescriptiondefault
includeAn array of console methods that you want to remove.'log'
0.2.0

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago