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
feat(env): load new env variable on update #1368
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reload when the file changes is beautifully done! Very nice!
The main point of the PR does not yet work though - when opening the preview and entering process.env
in the console, the old environment variables are still present.
Let me know if you have an idea on how to solve this, or if I should help come up with something!
So I need to flush the previous variable before reinjecting the new one.
That what you mean ? |
@Slashgear Yes, that would be the desired behavior! Since we currently don't make use of environment variables in Node.JS Another possibility: We currently use DefinePlugin by Webpack, and I found a way to dynamically change the values: https://webpack.js.org/plugins/define-plugin/#runtime-values-via-runtimevalue We could add a dependency on the |
My preferred solution would be if there is a refactor and the environment variables get added to |
Works super reliably and is very snappy! Thanks a lot for fixing the typo as well 🙌 |
Implemented the deluxe version and also added handling for adding / removing a .env file 😇 |
Why
Close #1363
How
.env
fileTodo
IssueHunt Summary
Referenced issues
This pull request has been submitted to:
.env
has changed