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

docs: distinguish the two "env var"s using different words #18941

Merged
merged 5 commits into from
Feb 7, 2025

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Dec 11, 2024

Description

The "Env Variables and Modes" guide had mixed two "env var"s:

  • Env var on the machine: the variables that can be referenced by $FOO in bash, $env:FOO in powershell
  • Env var in Vite: build-time constants that are replaced in build, exposed in import.meta.env

This was confusing and led people to understand that "Env vars in Vite" can be used not only for build-time constants.

The way this PR tries to solve is:

Preview: https://deploy-preview-18941--vite-docs-main.netlify.app/guide/constants-and-mode.html

@sapphi-red sapphi-red added the documentation Improvements or additions to documentation label Dec 11, 2024
@sapphi-red sapphi-red added the p2-nice-to-have Not breaking anything but nice to have (priority) label Jan 24, 2025
@sapphi-red
Copy link
Member Author

Reverted the page title 👍

@sapphi-red sapphi-red requested review from patak-dev and bluwy February 6, 2025 07:16
@sapphi-red sapphi-red merged commit d173f9e into vitejs:main Feb 7, 2025
11 checks passed
@sapphi-red sapphi-red deleted the docs/env-vars-and-constants branch February 7, 2025 01:52
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 p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants