Skip to content

Commit 8bb8299

Browse files
Update dependency @vitejs/plugin-react to v4.7.0
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 4.6.0 | 4.7.0 | ## [v4.7.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#470-2025-07-18) ##### Add HMR support for compound components ([#518](vitejs/vite-plugin-react#518)) HMR now works for compound components like this: ```tsx const Root = () => <div>Accordion Root</div> const Item = () => <div>Accordion Item</div> export const Accordion = { Root, Item } ``` ##### Return `Plugin[]` instead of `PluginOption[]` ([#537](vitejs/vite-plugin-react#537)) The return type has changed from `react(): PluginOption[]` to more specialized type `react(): Plugin[]`. This allows for type-safe manipulation of plugins, for example: ```tsx // previously this causes type errors react({ babel: { plugins: ['babel-plugin-react-compiler'] } }) .map(p => ({ ...p, applyToEnvironment: e => e.name === 'client' })) ```
1 parent 4f724c8 commit 8bb8299

File tree

2 files changed

+61
-288
lines changed

2 files changed

+61
-288
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@types/yargs": "17.0.33",
2828
"@typescript-eslint/eslint-plugin": "8.32.1",
2929
"@typescript-eslint/parser": "8.32.1",
30-
"@vitejs/plugin-react": "4.6.0",
30+
"@vitejs/plugin-react": "4.7.0",
3131
"dotenv": "16.6.1",
3232
"eslint": "8.23.1",
3333
"eslint-config-airbnb": "19.0.4",

0 commit comments

Comments
 (0)