A webpack plugin to clear specific type of console
npm install no-console-webpack-plugin --save-dev
Or
yarn add no-console-webpack-plugin --dev
const NoConsolePlugin = require('no-console-webpack-plugin');
module.exports = {
//in your webpack.config.js
//other config...
plugins:[
new NoConsolePlugin()
]
}
new NoConsolePlugin({
ignores:'log'
});
//or
new NoConsolePlugin({
ignores:[
'log',
'info',
'warn'
]
})