Gem 一覧へ戻る
alex-kinokon/rollup-plugin-ignore(新しいタブで開きます)
主要言語: JavaScript
Replace a module with an empty object.
- star 数
- 28
- watcher 数
- 1
- fork 数
- 1
- issue 数
- 0
- 最終更新
- 2026/02/26
主要言語: JavaScript
Replace a module with an empty object.
Prevent a module from showing up in the output bundle. You will get export default {} instead.
npm install --save-dev rollup-plugin-ignore
yarn add rollup-plugin-ignore --dev
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 })
MIT