An esbuild plugin that allows developers to exclude specific files from the build by placing a designated comment (e.g., `// esbuild-ignore`) at the top of the file. The current stable version is 0.3.29 and it is part of the Goldstack monorepo. It requires esbuild ^0.25.6 as a peer dependency. Key differentiators: lightweight, zero-config for ignoring files based on comments, and compatible with both ESM and CJS projects.
npm install esbuild-ignore-with-comments-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of the plugin with esbuild to ignore files containing a special comment.
Ensure the ignore comment (default: '// esbuild-ignore') is the first line in the file.
Update your files to use '// esbuild-ignore' or pass custom comment: esbuildIgnoreWithCommentsPlugin({ comment: '// @ignore' })For binary files, handle ignoring differently (e.g., via external flag).
import { esbuildIgnoreWithCommentsPlugin } from 'esbuild-ignore-with-comments-plugin'Ensure the ignore comment is the first line and no other comments appear before it.
Run 'npm install esbuild-ignore-with-comments-plugin' and use correct import.