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/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/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.

### Fix raw Rolldown support for Rolldown 1.0.0-beta.44+ ([#930](https://github.com/vitejs/vite-plugin-react/pull/930))

Rolldown 1.0.0-beta.44+ removed the top-level `jsx` option in favor of `transform.jsx`. This plugin now uses the `transform.jsx` option to support Rolldown 1.0.0-beta.44+.

## 5.0.4 (2025-09-27)

### Perf: use native refresh wrapper plugin in rolldown-vite ([#881](https://github.com/vitejs/vite-plugin-react/pull/881))
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"babel-plugin-react-compiler": "19.1.0-rc.3",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"rolldown": "1.0.0-beta.43",
"rolldown": "1.0.0-beta.44",
"tsdown": "^0.15.8"
}
}
7 changes: 5 additions & 2 deletions packages/plugin-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,11 @@ export default function viteReact(opts: Options = {}): Plugin[] {
},
options(options) {
if (!runningInVite) {
options.jsx = {
mode: opts.jsxRuntime,
// @ts-expect-error Rolldown has `transform.jsx`
options.transform ??= {}
// @ts-expect-error Rolldown has `transform.jsx`
options.transform.jsx = {
runtime: opts.jsxRuntime,
importSource: opts.jsxImportSource,
}
return options
Expand Down
Loading
Loading