esbuild-plugin-define

JSON →
library 0.6.0 ·javascript
verified Apr 27, 2026

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.

total hits 13
actors 3 distinct systems
last hit 7d ago human
GPTBot
2
Search engines
1
Humans
2

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇬🇧 United Kingdom · 🇪🇸 Spain