Nostalgic Perogi Monogramming
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

rollup-plugin-ignore

1.0.9 • Public • Published

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:

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:

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:

ignore(builtinModules, { commonjsBugFix: true })

License

MIT

Install

npm i rollup-plugin-ignore

DownloadsWeekly Downloads

2,785

Version

1.0.9

License

MIT

Unpacked Size

3.46 kB

Total Files

5

Last publish

Collaborators

  • avatar