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 ↓71% vs prev 7d
total hits 13
actors 3 distinct systems
last hit 7d ago human
top countries 🇨🇦 Canada · 🇺🇸 United States · 🇬🇧 United Kingdom · 🇪🇸 Spain
Resources
API endpoints
full doc /v1/registry/esbuild-plugin-define