esbuild-plugin-define
JSON →esbuild plugin that defines global identifiers at build time, similar to esbuild's built-in `define` feature but with a more structured and discoverable API. Version 0.6.0 is the latest stable release as of early 2025, with active development and monthly updates. Unlike manual `define` objects, this plugin supports nested object definitions (e.g., `process.env.API_KEY`) and merges with esbuild's native `define`. It ships TypeScript types and is designed for modern Node.js (>=20) with native ESM support. Key differentiator: avoids tedious string escaping for complex replacement values and provides a cleaner configuration pattern.
Traffic · last 30 days stale · no recent hits
total hits 39
actors 6 distinct systems
last hit 17d ago human
top countries 🇺🇸 United States · 🇨🇳 China · 🇨🇦 Canada · VN · 🇸🇬 Singapore
Resources
API endpoints
full doc /v1/registry/esbuild-plugin-define
compatibility /v1/registry/esbuild-plugin-define/compatibility