Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/plugin-react-swc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

SSR applications can now initialize HMR runtime by importing `@vitejs/plugin-react-swc/preamble` at the top of their client entry instead of manually calling `transformIndexHtml`. This simplifies SSR setup for applications that don't use the `transformIndexHtml` API.

### Use SWC when useAtYourOwnRisk_mutateSwcOptions is provided ([#951](https://github.com/vitejs/vite-plugin-react/pull/951))

Previously, this plugin did not use SWC if plugins were not provided even if `useAtYourOwnRisk_mutateSwcOptions` was provided. This is now fixed.

## 4.1.0 (2025-09-17)

### Set SWC cacheRoot options
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-react-swc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const react = (_options?: Options): Plugin[] => {
return { code: newCode ?? result.code, map: result.map }
},
},
options.plugins
options.plugins || options.useAtYourOwnRisk_mutateSwcOptions
? {
name: 'vite:react-swc',
apply: 'build',
Expand Down
Loading