drop-console-webpack-plugin
v3.0.2
Published
A webpack plugin for removing console and supporting webpack4
Downloads
112
Maintainers
Readme
drop-console-webpack-plugin
A webpack plugin for removing console and supporting webpack4
Installation
npm install drop-console-webpack-plugin --save
Usage
const DropConsoleWebpackPlugin = require('drop-console-webpack-plugin')
plugins: [
new DropConsoleWebpackPlugin(),
]
Notes
if webpack version < 4 : 4.0.0>drop-console-webpack-plugin version >=3.0.0
if webpack version >= 4 : drop-console-webpack-plugin version >=4.0.0 && nodejs version > 7.6
Options
Name | type | default | Description
---- | ---- | ------- | -----------
drop_log | Boolean | true | remove console.log(...)
drop_info | Boolean | true | remove console.info(...)
drop_warn | Boolean | false | remove console.warn(...)
drop_error | Boolean | false | remove console.error(...)
exclude | Array | [] | exclude chunk
Code
new DropConsoleWebpackPlugin({
drop_log : true,
drop_info : true,
drop_warn : false,
drop_error : false,
exclude : [],
})