Socket
Socket
Sign inDemoInstall

rollup-plugin-ignore

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rollup-plugin-ignore

Ignore a module in rollup.js


Version published
Weekly downloads
16K
decreased by-1.91%
Maintainers
1
Install size
4.38 kB
Created
Weekly downloads
 

Changelog

Source

1.0.10

  • feat: vite compatibility

Readme

Source

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

Keywords

FAQs

Last updated on 26 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc