esbuild-plugin-ignore (v1.1.1) is a plugin for esbuild that allows ignoring specific dependencies during bundling, similar to Webpack's IgnorePlugin. It provides a straightforward way to exclude modules based on regular expressions matching resource and context paths. The package supports both ESM and CommonJS, and is actively maintained. Key differentiators: simple API, no external dependencies, works with esbuild's plugin system. Version 1.1.1 is the latest stable release with no recent changes.
npm install esbuild-plugin-ignoreVerified import paths — ran on the pinned version, not inferred.
Configures esbuild with ignorePlugin to exclude certain modules (e.g., pg-native, tedious) from bundling using Webpack-like ignore rules.
Use specific resourceRegExp and contextRegExp patterns matching only the modules you intend to ignore.
Ensure ignored modules are not actually used in your code or provide polyfills as needed.
Explicitly define contextRegExp to avoid unintended matches.
Either install the missing dependency or add it to the ignorePlugin rule with correct resourceRegExp.
Use named import: `import { ignorePlugin } from 'esbuild-plugin-ignore'`Run `npm install esbuild-plugin-ignore` or `yarn add esbuild-plugin-ignore`.
No dependency data recorded yet.