esbuild-c (v0.1.37) enhances esbuild with config processing capabilities: aligning CLI options with the JS API, supporting config merging via 'extends', and loading configs in various formats (JSON, YAML, JS, TS) using cosmiconfig. As a PoC, it addresses esbuild issue #884 (CLI plugin specification) and offers both CLI and programmatic usage. It requires esbuild >=0.19.0 and ships TypeScript types. Unlike alternatives like esbuild-config or esbuild-resolve-config, it focuses on extendable config merging and format flexibility.
npm install esbuild-cNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use esbuild-c programmatically: parse CLI args, load config, merge, and build with esbuild.
Pin exact version and monitor GitHub releases for breaking changes.
Specify an explicit --config path to avoid accidental loading.
Use plugin paths or register plugins programmatically.
Ensure esbuild-c and esbuild are installed: npm i -D esbuild-c esbuild. For ESM, set "type": "module" in package.json or use .mjs extension.
Use dynamic import: const { loadConfig } = await import('esbuild-c'); or switch to ESM.Use named import: import { loadConfig } from 'esbuild-c'.