--define
without --minify
does not replace process.env
variables when accessed by index access instead of property access
#16025
Labels
What version of Bun is running?
1.1.38+bf2f153f5
What platform is your computer?
Linux 6.6.63 x86_64 unknown
What steps can reproduce the bug?
bun build --define process.env.LOREM="'lorem'" index.ts
What is the expected behavior?
What do you see instead?
Additional information
Might be related to #10165.
Users are required to do index access instead of property access on
process.env
if they enable noPropertyAccessFromIndexSignature tsconfig.json option.It works fine when we add
--minify
flag.It produces:
The text was updated successfully, but these errors were encountered: