Skip to content

docs: fix some mistakes in Environment API guides#20000

Merged
patak-cat merged 9 commits intovitejs:mainfrom
silvenon:docs/environment-api-guide
May 30, 2025
Merged

docs: fix some mistakes in Environment API guides#20000
patak-cat merged 9 commits intovitejs:mainfrom
silvenon:docs/environment-api-guide

Conversation

@silvenon
Copy link
Contributor

@silvenon silvenon commented May 4, 2025

Description

I love the Environment API. Here are a few important fixes to the guides to help people when trying it out:

  • rename a reference from a non-existent node environment to server
  • remove the usage of the non-existent vite-environment-provider package
  • references to environments were generic-sounding in some guides (environment), and specific in others (ssrEnvironment), so I made them all specific, which I believe is good practice anyway
  • there is advice that ssr environment can be called server as well, which is arguably misleading because creating a server environment would not receive any of the built-in ssr configuration, so I simply removed this sentence

@silvenon silvenon requested a review from patak-cat May 5, 2025 14:43
@silvenon
Copy link
Contributor Author

silvenon commented May 5, 2025

Wow, I sure did suck at this 😆 Thanks for being so constructive about it, though, and let me know if there's anything else.

@patak-cat
Copy link
Member

Oh, no problem! It is good to see where you are finding difficulties in the docs. I'll let others check the PR to see if they would like to change the environment names as you proposed. To be honest, I'm fine with the names we had (except for the typo you corrected with environment.node)

@sapphi-red sapphi-red added the documentation Improvements or additions to documentation label May 7, 2025
@silvenon silvenon requested a review from sapphi-red May 11, 2025 12:14
@patak-cat patak-cat merged commit 54e0a18 into vitejs:main May 30, 2025
11 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.

3 participants