A configuration loader for esbuild that integrates with cosmiconfig, allowing users to define esbuild build options in familiar config formats (JSON, YAML, TOML, JS, TS, etc.) without custom scripts. Current stable version is 0.7.2, with monthly releases. Supports ESM and CommonJS, ships TypeScript types. Unlike esbuild's CLI, it auto-loads config from standard locations and supports watch mode. Requires Node >=20 and esbuild >=0.25.
npm install cosmic-esbuildNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows both config file and programmatic usage of cosmic-esbuild to build an esbuild project.
Upgrade Node.js to version 20 or higher.
Ensure esbuild is installed at version 0.25 or later.
No action needed; dependency was removed.
Use a configuration file for full esbuild build options.
Set 'outdir' in config or use --outdir flag.
Run npm install cosmic-esbuild in your project.
Use import cosmicEsbuild from 'cosmic-esbuild' (default import).
Upgrade esbuild: npm install esbuild@latest
Create a config file like esbuild.config.js, or use --config flag with correct path.