Skip to content

Commit 29e98dc

Browse files
authored
docs: correct WebSocket spelling (#20890)
1 parent d3e7eee commit 29e98dc

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/guide/api-environment-runtimes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ A Vite dev server exposes two environments by default: a `client` environment an
8080

8181
The transformed source code is called a module, and the relationships between the modules processed in each environment are kept in a module graph. The transformed code for these modules is sent to the runtimes associated with each environment to be executed. When a module is evaluated in the runtime, its imported modules will be requested triggering the processing of a section of the module graph.
8282

83-
A Vite Module Runner allows running any code by processing it with Vite plugins first. It is different from `server.ssrLoadModule` because the runner implementation is decoupled from the server. This allows library and framework authors to implement their layer of communication between the Vite server and the runner. The browser communicates with its corresponding environment using the server Web Socket and through HTTP requests. The Node Module runner can directly do function calls to process modules as it is running in the same process. Other environments could run modules connecting to a JS runtime like workerd, or a Worker Thread as Vitest does.
83+
A Vite Module Runner allows running any code by processing it with Vite plugins first. It is different from `server.ssrLoadModule` because the runner implementation is decoupled from the server. This allows library and framework authors to implement their layer of communication between the Vite server and the runner. The browser communicates with its corresponding environment using the server WebSocket and through HTTP requests. The Node Module runner can directly do function calls to process modules as it is running in the same process. Other environments could run modules connecting to a JS runtime like workerd, or a Worker Thread as Vitest does.
8484

8585
One of the goals of this feature is to provide a customizable API to process and run code. Users can create new environment factories using the exposed primitives.
8686

docs/guide/api-javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ interface ViteDevServer {
114114
*/
115115
watcher: FSWatcher
116116
/**
117-
* Web socket server with `send(payload)` method.
117+
* WebSocket server with `send(payload)` method.
118118
*/
119119
ws: WebSocketServer
120120
/**

docs/guide/api-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Vite plugins can also provide hooks that serve Vite-specific purposes. These hoo
286286

287287
**Storing Server Access**
288288

289-
In some cases, other plugin hooks may need access to the dev server instance (e.g. accessing the web socket server, the file system watcher, or the module graph). This hook can also be used to store the server instance for access in other hooks:
289+
In some cases, other plugin hooks may need access to the dev server instance (e.g. accessing the WebSocket server, the file system watcher, or the module graph). This hook can also be used to store the server instance for access in other hooks:
290290

291291
```js
292292
const myPlugin = () => {

packages/vite/src/node/server/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ export interface ViteDevServer {
275275
*/
276276
watcher: FSWatcher
277277
/**
278-
* web socket server with `send(payload)` method
278+
* WebSocket server with `send(payload)` method
279279
*/
280280
ws: WebSocketServer
281281
/**

0 commit comments

Comments
 (0)