# remove-console-webpack-plugin

> A light webpack plugin to remove console in your JS code.

Latest version **0.2.0** (published 2021-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install remove-console-webpack-plugin
pnpm add remove-console-webpack-plugin
yarn add remove-console-webpack-plugin
bun add remove-console-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2021-05-26 |
| First published | 2021-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Yuan yiming |
| Maintainers | yuan_yiming |
| Keywords | webpack, plugin, javascript |

## Links

- npm: https://www.npmjs.com/package/remove-console-webpack-plugin
- Repository: https://github.com/Yuan-Yiming/remove-console-webpack-plugin
- Homepage: https://github.com/Yuan-Yiming/remove-console-webpack-plugin#readme
- Issues: https://github.com/Yuan-Yiming/remove-console-webpack-plugin/issues
- npm.io page: https://npm.io/package/remove-console-webpack-plugin

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2021-05-26
- 0.1.8 — 2021-05-23
- 0.1.7 — 2021-05-22
- 0.1.6 — 2021-05-22
- 0.1.5 — 2021-05-22
- 0.1.4 — 2021-05-22
- 0.1.3 — 2021-05-20
- 0.1.2 — 2021-05-20
- 0.1.1 — 2021-05-20
- 0.1.0 — 2021-05-20

## README

# remove-console-webpack-plugin
A light webpack plugin to remove console.* in your JS code without any dependencies.

## Example

**In**

```js
console.log("log test"); // by default
console.error("error test"); // need to configure
```

**Out**

```js
```

## Installation
```sh
npm install remove-console-webpack-plugin --save-dev
```

## Usage
```js
// webpack.config.js
const RemoveConsolePlugin = require('remove-console-webpack-plugin')

// demo1: remove console.log by default
module.exports = {
  // other code ...
  plugins: [
    new RemoveConsolePlugin()
  ]
}

// demo2: remove console.log, console.warn, console.error 
module.exports = {
  // other code ...
  plugins: [
    new RemoveConsolePlugin({ include: ['log', 'warn', 'error'] })
  ]
}

// demo3: remove console.*
module.exports = {
  // other code ...
  plugins: [
    new RemoveConsolePlugin({ include: ['*'] })
  ]
}
```


## Options
| option | description | default |
| ------ | ----------- | ------- |
| include | An array of console methods that you want to remove. | ['log']|

---
_Source: https://npm.io/package/remove-console-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
