Skip to content

ravvis/remove-console-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published