Skip to content

Conversation

abdelrhman-arnos
Copy link
Contributor

@abdelrhman-arnos abdelrhman-arnos commented Aug 16, 2025

Description

Clarifies how and when .env files are loaded relative to config evaluation.

Fixes #20611.

Changes limited to:

  • docs/config/index.md: Replaces ambiguous wording that implied Vite doesn't load .env at all with an explanation that loading is deferred until after config resolution, and adds guidance on when to use loadEnv.

No other files touched, Env & Mode page intentionally left unchanged (it was already accurate).

@sapphi-red sapphi-red added the documentation Improvements or additions to documentation label Aug 18, 2025
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sapphi-red sapphi-red merged commit d0ebe36 into vitejs:main Aug 25, 2025
12 checks passed
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.

Confusing language in documentation regarding .env files
2 participants