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

Dedicated H3 to accessing Env Vars #8885

Closed
wants to merge 1 commit into from
Closed

Conversation

sebscholl
Copy link

Description

I propose dedicating a h3 section to "Accessing Environment Variables in Application Code" that more clearly calls out how env vars need to be prefixed with VUE_ to be accessed via import.meta.env in client source code.

Additional context

I felt that this information was hidden within the .env Files section when it deserves its own nested section.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

I propose dedicating a h3 section to "Accessing Environment Variables in Application Code" that more clearly calls out how env vars need to be prefixed with `VUE_` to be accessed via `import.meta.env` in client source code.
@netlify
Copy link

netlify bot commented Jul 1, 2022

Deploy Preview for vite-docs-main ready!

Name Link
🔨 Latest commit b5d80c2
🔍 Latest deploy log https://app.netlify.com/sites/vite-docs-main/deploys/62bf3a8dc00fd90008fa9fac
😎 Deploy Preview https://deploy-preview-8885--vite-docs-main.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sapphi-red sapphi-red added the documentation Improvements or additions to documentation label Jul 3, 2022
@bluwy
Copy link
Member

bluwy commented Jul 14, 2022

In #8989 I added a code example showing how to access them, which I think should catch the attention for using it. I'll close this in favour of it.

@bluwy bluwy closed this Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants