Skip to content

Commit bbfd1b7

Browse files
committed
chore: update changelog for #537
1 parent fdc9d9a commit bbfd1b7

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

packages/plugin-react-oxc/CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ const Item = () => <div>Accordion Item</div>
1313
export const Accordion = { Root, Item }
1414
```
1515

16-
### Return `Plugin[]` instead of `PluginOption[]`
16+
### Return `Plugin[]` instead of `PluginOption[]` ([#537](https://github.com/vitejs/vite-plugin-react/pull/537))
17+
18+
The return type has changed from `react(): PluginOption[]` to more specialized type `react(): Plugin[]`. This allows for type-safe manipulation of plugins, for example:
19+
20+
```tsx
21+
// previously this causes type errors
22+
react()
23+
.map(p => ({ ...p, applyToEnvironment: e => e.name === 'client' }))
24+
```
1725

1826
## 0.2.3 (2025-06-16)
1927

packages/plugin-react-swc/CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ const Item = () => <div>Accordion Item</div>
1313
export const Accordion = { Root, Item }
1414
```
1515

16-
### Return `Plugin[]` instead of `PluginOption[]`
16+
### Return `Plugin[]` instead of `PluginOption[]` ([#537](https://github.com/vitejs/vite-plugin-react/pull/537))
17+
18+
The return type has changed from `react(): PluginOption[]` to more specialized type `react(): Plugin[]`. This allows for type-safe manipulation of plugins, for example:
19+
20+
```tsx
21+
// previously this causes type errors
22+
react()
23+
.map(p => ({ ...p, applyToEnvironment: e => e.name === 'client' }))
24+
```
1725

1826
## 3.10.2 (2025-06-10)
1927

packages/plugin-react/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Item = () => <div>Accordion Item</div>
1313
export const Accordion = { Root, Item }
1414
```
1515

16-
### Return `Plugin[]` instead of `PluginOption[]`
16+
### Return `Plugin[]` instead of `PluginOption[]` ([#537](https://github.com/vitejs/vite-plugin-react/pull/537))
1717

1818
The return type has changed from `react(): PluginOption[]` to more specialized type `react(): Plugin[]`. This allows for type-safe manipulation of plugins, for example:
1919

0 commit comments

Comments
 (0)