mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 21:32:05 +00:00
When using `--env` to inline environment variables, the bundler was not replacing `process.env.FOO` when a local `process` variable shadowed the global. This was confusing for users who expected `--env` patterns to always be replaced as build-time constants. The fix adds a `replace_even_if_shadowed` flag to `DefineData` which is set for env defines. When this flag is set, `isDotDefineMatch` will allow the replacement even when the base identifier is bound to a local variable. Fixes #24348 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>