Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.env being replaced by the string value of the variables during bun build #9016

Closed
101dal opened this issue Feb 20, 2024 · 1 comment
Labels
bug Something isn't working bundler Something to do with the bundler

Comments

@101dal
Copy link

101dal commented Feb 20, 2024

What version of Bun is running?

1.0.23+83f2432da

What platform is your computer?

Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

Build a project with the command bun build target=bun --minify.
This project should contain environment variables imported with process.env.VARIABLE
Example of the .env file:
VARIABLE=Thisisavariable

What is the expected behavior?

When building the project, the process.env.VARIABLE should be visible on search (or an equivalent)

What do you see instead?

The process.env.VARIABLE is replaced by it's value in the environment file.
For the given example in the code there is directly:
Thisisavariable

Additional information

The expected behavior can be obtained when replacing process.env.VARIABLE by Bun.env.VARIABLE

@101dal 101dal added the bug Something isn't working label Feb 20, 2024
@Electroid Electroid added the bundler Something to do with the bundler label Feb 20, 2024
@Electroid
Copy link
Contributor

Duplicate of #8125

@Electroid Electroid marked this as a duplicate of #8125 Feb 20, 2024
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bundler Something to do with the bundler
Projects
None yet
Development

No branches or pull requests

2 participants