Skip to content

Commit 9438a9d

Browse files
rivajuniorRivaldo Junior
and
Rivaldo Junior
authored
docs: update package name (#3266)
Co-authored-by: Rivaldo Junior <[email protected]>
1 parent 4e8ffd8 commit 9438a9d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/plugin-react-refresh/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ export default {
2020
plugins: [reactRefresh({
2121
parserPlugins: [
2222
'classProperties',
23-
'classPrivateProperties
23+
'classPrivateProperties'
2424
]
2525
})]
2626
}
2727
```
2828

2929
[Full list of Babel parser plugins](https://babeljs.io/docs/en/babel-parser#ecmascript-proposalshttpsgithubcombabelproposals).
3030

31-
**Notes**
31+
### Notes
3232

3333
- If using TSX, any TS-supported syntax will already be transpiled away so you won't need to specify them here.
3434

@@ -38,11 +38,11 @@ export default {
3838

3939
## Middleware Mode Notes
4040

41-
When Vite is launched in **Middleware Mode**, you need to make sure your entry `index.html` file is transformed with `ViteDevServer.transformIndexHtml`. Otherwise, you may get an error prompting `Uncaught Error: vite-plugin-react can't detect preamble. Something is wrong.`
41+
When Vite is launched in **Middleware Mode**, you need to make sure your entry `index.html` file is transformed with `ViteDevServer.transformIndexHtml`. Otherwise, you may get an error prompting `Uncaught Error: @vitejs/plugin-react-refresh can't detect preamble. Something is wrong.`
4242

4343
To mitigate this issue, you can explicitly transform your `index.html` like this when configuring your express server:
4444

45-
```ts
45+
```js
4646
app.get('/', async (req, res, next) => {
4747
try {
4848
let html = fs.readFileSync(path.resolve(root, 'index.html'), 'utf-8')

packages/plugin-react-refresh/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ function reactRefreshPlugin(opts) {
136136
137137
if (!window.__vite_plugin_react_preamble_installed__) {
138138
throw new Error(
139-
"vite-plugin-react can't detect preamble. Something is wrong. " +
140-
"See https://github.com/vitejs/vite-plugin-react/pull/11#discussion_r430879201"
139+
"@vitejs/plugin-react-refresh can't detect preamble. Something is wrong. " +
140+
"See https://github.com/vitejs/@vitejs/plugin-react-refresh/pull/11#discussion_r430879201"
141141
);
142142
}
143143

0 commit comments

Comments
 (0)