# webpack-null-plugin

> Empty webpack plugin

Latest version **0.0.2** (published 2017-07-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install webpack-null-plugin
pnpm add webpack-null-plugin
yarn add webpack-null-plugin
bun add webpack-null-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.0.2 |
| Published | 2017-07-19 |
| First published | 2017-07-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nathan Reid |
| Maintainers | nathantreid |
| Keywords | webpack, null, empty, plugin |

## Links

- npm: https://www.npmjs.com/package/webpack-null-plugin
- npm.io page: https://npm.io/package/webpack-null-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.0.2 (latest) — 2017-07-19
- 0.0.1 — 2017-07-19

## README

## Installation

```
npm i -S webpack-null-plugin
```

## Usage
This plugin uses the null object pattern to simplify webpack configs with conditional plugins.

For example, perhaps you only want to run the [`start-server-webpack-plugin`](https://www.npmjs.com/package/start-server-webpack-plugin) plugin when the environment variable WEBPACK_START_SERVER equals 1:

``` js
const StartServerPlugin = require('start-server-webpack-plugin');
const NullPlugin = require('webpack-null-plugin');
const shouldRunServer = process.env.WEBPACK_START_SERVER === '1';

module.exports = {
  /* ...rest of config... */
  plugins: [
    shouldRunServer ? new StartServerPlugin('index.js') : new NullPlugin(),
  ],
};

```

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