remove-console-loader
v0.0.3
Published
A webpack loader that removes console statements
Downloads
44
Maintainers
Readme
remove-console-loader
Remove console statements(configurable) from the webpack build
Getting Started
To begin, you'll need to install remove-console-loader
:
npm i -D remove-console-loader
src/index.js
const someVar = "Hello World";
console.log(someVar);
webpack.config.js
module.exports = {
module: {
rules: [{
test: /\.js$/,
exclude: /(node_modules)/,
use: [
{
loader: "remove-console-loader",
options: {
"exclude": [ "error", "warn"]
}
}
],
}],
},
};
Finally run webpack
via your preferred method.