Open donmccurdy opened 1 month ago
Hey folks! Is there any movement on this topic? I'm building with vite and react, and the ability to import env variables via import.meta.env.VITE_MY_ENV_VAR
is required to provide a comparable experience between Stackblitz and the cloned repo. Is this a topic that is going to be touched?
Describe the bug
Previously, I believe that initializing a new Stackblitz project from a URL ...
... would include
.env
files, if they were checked into the repository (not in.gitignore
). Testing some older examples now, that no longer works, and.env
files are missing from the initialized Stackblitz project, causes startup to fail. For easier reproduction, I've created a minimal repository here:https://github.com/donmccurdy/20241010-stackblitz-dotfiles
Link to the blitz that caused the error
https://stackblitz.com/github/donmccurdy/20241010-stackblitz-dotfiles
Steps to reproduce
env
loads, but.env
is missingExpected behavior
.env.local
SHOULD be missing — it is in.gitignore
and was never pushed to GitHub.env
SHOULD NOT be missing — it is in version control, and is visible on GitHubParity with Local
Screenshots
Output:
Platform
n/a
Additional context
I've filed an issue for the same problem at https://github.com/stackblitz/core/issues/3125, not sure which location is preferred in this case. Thanks!