# rollup-plugin-ignore

> Ignore a module in rollup.js

Latest version **1.0.10** (published 2021-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-ignore
pnpm add rollup-plugin-ignore
yarn add rollup-plugin-ignore
bun add rollup-plugin-ignore
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2021-08-26 |
| First published | 2016-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | proteriax |
| Maintainers | proteria |
| Keywords | rollup, rollup-plugin |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-ignore
- Repository: https://github.com/proteriax/rollup-plugin-ignore
- Homepage: https://github.com/proteriax/rollup-plugin-ignore#readme
- Issues: https://github.com/proteriax/rollup-plugin-ignore/issues
- npm.io page: https://npm.io/package/rollup-plugin-ignore

## 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

- 1.0.10 (latest) — 2021-08-26
- 1.0.9 — 2020-07-30
- 1.0.8 — 2020-07-27
- 1.0.7 — 2020-07-27
- 1.0.6 — 2020-06-04
- 1.0.5 — 2019-02-08
- 1.0.4 — 2018-10-09
- 1.0.3 — 2016-10-11
- 1.0.2 — 2016-10-06
- 1.0.1 — 2016-10-06
- 1.0.0 — 2016-10-06

## README

# rollup-plugin-ignore

Prevent a module from showing up in the output bundle. You will get `export default {}` instead.

## Installation

```
npm install --save-dev rollup-plugin-ignore
yarn add rollup-plugin-ignore --dev
```

## Usage

Let’s say you want to prevent `fs` and `net` from being bundled:

```javascript
import ignore from "rollup-plugin-ignore"

export default {
  input: "main.js",
  plugins: [ignore(["fs", "net"])],
}
```

To ignore all built-in Node.js modules, use the following:

```javascript
import { builtinModules } from "module"
import ignore from "rollup-plugin-ignore"

export default {
  input: "main.js",
  plugins: [
    ignore(builtinModules),
  ],
}),
```

**Note:** If you are having problems with using `@rollup/plugin-commonjs` with this plugin, try
the temporary fix:

```javascript
ignore(builtinModules, { commonjsBugFix: true })
```

## License

MIT

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