Rollup plugin that excludes specified modules from the output bundle, replacing them with an empty default export. Current stable version is 1.0.10, with infrequent releases. It is a minimal, focused tool for preventing Node.js built-ins like `fs` or `net` from being bundled. Unlike alternatives like `@rollup/plugin-virtual`, it specifically removes the module content rather than providing stub implementations. The plugin includes a `commonjsBugFix` option to work around an issue with `@rollup/plugin-commonjs`. It ships TypeScript type definitions and is designed for use with Rollup's ESM-based plugin system.
npm install rollup-plugin-ignoreVerified import paths — ran on the pinned version, not inferred.
Rollup configuration that excludes the Node.js built-in modules 'fs' and 'net' from the bundle, replacing them with empty exports.
Ensure you are not relying on any side effects from the ignored module.
Add `{ commonjsBugFix: true }` as second argument to the `ignore` call.Keep updated with upstream changes; consider switching to a more robust solution like `@rollup/plugin-virtual` or `rollup-plugin-polyfill-node`.
Use `import ignore from 'rollup-plugin-ignore'` instead of `import { ignore } from 'rollup-plugin-ignore'`.Use `const ignore = require('rollup-plugin-ignore').default;`Ensure the plugin is imported correctly as the default export and called as a function: `ignore(['fs'])` in the plugins array.
No dependency data recorded yet.