Skip to content

Commit 1d6365b

Browse files
docs: fix typo "constrains" to "constraints" (#18879)
1 parent d59efd8 commit 1d6365b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/guide/api-environment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ When we move to a typical server side rendered (SSR) app, we'll have two environ
2424
- `client`: runs the app in the browser.
2525
- `server`: runs the app in node (or other server runtimes) which renders pages before sending them to the browser.
2626

27-
In dev, Vite executes the server code in the same Node process as the Vite dev server, giving a close approximation to the production environment. However, it is also possible for servers to run in other JS runtimes, like [Cloudflare's workerd](https://github.com/cloudflare/workerd) which have different constrains. Modern apps may also run in more than two environments, e.g. a browser, a node server, and an edge server. Vite 5 didn't allow to properly represent these environments.
27+
In dev, Vite executes the server code in the same Node process as the Vite dev server, giving a close approximation to the production environment. However, it is also possible for servers to run in other JS runtimes, like [Cloudflare's workerd](https://github.com/cloudflare/workerd) which have different constraints. Modern apps may also run in more than two environments, e.g. a browser, a node server, and an edge server. Vite 5 didn't allow to properly represent these environments.
2828

2929
Vite 6 allows users to configure their app during build and dev to map all of its environments. During dev, a single Vite dev server can now be used to run code in multiple different environments concurrently. The app source code is still transformed by Vite dev server. On top of the shared HTTP server, middlewares, resolved config, and plugins pipeline, the Vite dev server now has a set of independent dev environments. Each of them is configured to match the production environment as closely as possible, and is connected to a dev runtime where the code is executed (for workerd, the server code can now run in miniflare locally). In the client, the browser imports and executes the code. In other environments, a module runner fetches and evaluates the transformed code.
3030

0 commit comments

Comments
 (0)