Files
bun.sh/test/regression
Claude Bot 698d8a0692 fix(bundler): replace process.env.* even when process is shadowed
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>
2026-01-19 22:08:47 +00:00
..