wcc

webpack-clear-console

Console log,error,debug,info stiuations removes from source code during bundling

Showing:

Popularity

Downloads/wk

275

GitHub Stars

32

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.5KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

webpack-clear-console

Webpack-clear-console plugin clears console by replacing console functions during bundling

Installation

The plugin is available via npm:

$ npm i webpack-clear-console

Examples

You can see an example at demo/webpack.config.js.

if you dont want to delete a console statement,you can add a comment called "NotClearConsole" as in the following example

function test(){
console.dir({ will: be, removed: "true" })
console.log("except for this one!");/*NotClearConsole*/
}

Note:if there is more than one console statement in source code,console expression that you dont want to delete must add to under the other console statement

Basic

var WebpackClearConsole = require("webpack-clear-console").WebpackClearConsole;

module.exports = {
 plugins: [
    // Other plugins.
    // WebpackClearConsole plugin removes all statements beginning with console.
    new WebpackClearConsole();
  ]
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100