Skip to content

Commit 37677e6

Browse files
hi-ogawaclaude
andcommitted
docs: fix typos and improve wording in preamble section
- Fix typos: "intiialize" → "initialize", "intiialization" → "initialization" - Fix grammar: "a following" → "the following" - Improve wording for clarity and conciseness 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 0e7eb5f commit 37677e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/plugin-react/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ Under the hood, this simply updates the React Fash Refresh runtime URL from `/@r
104104

105105
## `@vitejs/plugin-react/preamble`
106106

107-
For SSR application, which doesn't make use of [`transformIndexHtml` API](https://vite.dev/guide/api-javascript.html#vitedevserver), the package provides `@vitejs/plugin-react/preamble` to intiialize HMR runtime from client entrypoint, for example:
107+
The package provides `@vitejs/plugin-react/preamble` to initialize HMR runtime from client entrypoint for SSR applications which don't use [`transformIndexHtml` API](https://vite.dev/guide/api-javascript.html#vitedevserver). For example:
108108

109109
```js
110110
// [entry.client.js]
111111
import '@vitejs/plugin-react/preamble'
112112
```
113113

114-
Alternatively, you can manually call `transformIndexHtml` during SSR, which sets up equivalent intiialization code. Here's an example for an Express server:
114+
Alternatively, you can manually call `transformIndexHtml` during SSR, which sets up equivalent initialization code. Here's an example for an Express server:
115115

116116
```js
117117
app.get('/', async (req, res, next) => {
@@ -128,7 +128,7 @@ app.get('/', async (req, res, next) => {
128128
})
129129
```
130130

131-
Otherwise, you'll get a following error:
131+
Otherwise, you'll get the following error:
132132

133133
```
134134
Uncaught Error: @vitejs/plugin-react can't detect preamble. Something is wrong.

0 commit comments

Comments
 (0)