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

Update mode-and-env.md #4257

Merged
merged 3 commits into from
Jul 24, 2019
Merged

Update mode-and-env.md #4257

merged 3 commits into from
Jul 24, 2019

Conversation

techieff
Copy link
Contributor

@techieff techieff commented Jul 10, 2019

Fixed example of keys, which they should start with VUE_APP_, related to #767

Fixed example of keys, which they should start with VUE_APP_
Copy link
Member

@NataliaTepluhina NataliaTepluhina left a 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
@techieff
Copy link
Contributor Author

Thanks for reviewing.

Indeed. Because it can be easily overlooked currently.
I changed it as you suggested.

Co-Authored-By: Natalia Tepluhina <NataliaTepluhina@users.noreply.github.com>
@NataliaTepluhina
Copy link
Member

Thank you for the changes!

@NataliaTepluhina NataliaTepluhina merged commit 149b307 into vuejs:docs Jul 24, 2019
@vue-bot
Copy link

vue-bot commented Jul 24, 2019

Thanks again! 💚

haoqunjiang pushed a commit that referenced this pull request Jul 29, 2019
* 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 <NataliaTepluhina@users.noreply.github.com>
(cherry picked from commit 149b307)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants