-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Update mode-and-env.md #4257
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
Update mode-and-env.md #4257
Conversation
Fixed example of keys, which they should start with VUE_APP_
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.
Thank you for creating the PR.
In fact, .env
file can contain any key-value pairs that can be used on both client-side and server-side. VUE_APP_
prefix limitation applies only to client-side: only variables that start with this will be statically embedded into the client bundle. There is a note about it on https://cli.vuejs.org/guide/mode-and-env.html#using-env-variables-in-client-side-code
I am not sure if we want to include a second warning about the prefix in the guide but it seems to be a good idea to move this note right below the example like you did. What do you think if we leave FOO=BAR
as it is but will place the explanation about VUE_APP_
prefix right below this code block?
change position of the tip
Thanks for reviewing. Indeed. Because it can be easily overlooked currently. |
Co-Authored-By: Natalia Tepluhina <[email protected]>
Thank you for the changes! |
Thanks again! 💚 |
* Update mode-and-env.md Fixed example of keys, which they should start with VUE_APP_ * Update mode-and-env.md change position of the tip * Update docs/guide/mode-and-env.md Co-Authored-By: Natalia Tepluhina <[email protected]> (cherry picked from commit 149b307)
Fixed example of keys, which they should start with
VUE_APP_
, related to #767