Skip to content

Commit d648f12

Browse files
authored
Merge branch 'main' into 07-28-fix_rsc_show_warning_when_auto_css_heuristics_failed
2 parents d1d9425 + 83a5741 commit d648f12

File tree

39 files changed

+624
-390
lines changed

39 files changed

+624
-390
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ jobs:
9393
- name: Test SWC
9494
run: pnpm --filter ./packages/plugin-react-swc run test
9595

96+
- name: Setup rolldown-vite
97+
run: |
98+
sed -i"" -e "s/overrides:/overrides:\n vite: catalog:rolldown-vite/" pnpm-workspace.yaml
99+
pnpm i --no-frozen-lockfile
100+
101+
- name: Test serve (rolldown-vite)
102+
run: pnpm run test-serve
103+
104+
- name: Test build (rolldown-vite)
105+
run: pnpm run test-build
106+
96107
lint:
97108
if: github.repository == 'vitejs/vite-plugin-react'
98109
timeout-minutes: 10

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
"ci-publish": "tsx scripts/publishCI.ts"
3434
},
3535
"devDependencies": {
36-
"@eslint/js": "^9.31.0",
36+
"@eslint/js": "^9.32.0",
3737
"@types/fs-extra": "^11.0.4",
3838
"@types/node": "^22.16.5",
3939
"@vitejs/release-scripts": "^1.6.0",
40-
"eslint": "^9.31.0",
40+
"eslint": "^9.32.0",
4141
"eslint-plugin-import-x": "^4.16.1",
42-
"eslint-plugin-n": "^17.21.0",
42+
"eslint-plugin-n": "^17.21.2",
4343
"eslint-plugin-regexp": "^2.9.0",
4444
"fs-extra": "^11.3.0",
4545
"globals": "^16.3.0",
@@ -51,7 +51,7 @@
5151
"tsx": "^4.20.3",
5252
"typescript": "^5.8.3",
5353
"typescript-eslint": "^8.38.0",
54-
"vite": "^7.0.5",
54+
"vite": "^7.0.6",
5555
"vitest": "^3.2.4"
5656
},
5757
"simple-git-hooks": {

packages/plugin-react-oxc/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Unreleased
44

5+
## 0.4.0-beta.0 (2025-07-28)
6+
7+
### Deprecate this plugin
8+
9+
The changes of this plugin is now included in `@vitejs/plugin-react`. Please use `@vitejs/plugin-react` instead.
10+
511
### Allow processing files in `node_modules`
612

713
The default value of `exclude` options is now `[/\/node_modules\//]` to allow processing files in `node_modules` directory. It was previously `[]` and files in `node_modules` was always excluded regardless of the value of `exclude` option.

packages/plugin-react-oxc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vitejs/plugin-react-oxc",
3-
"version": "0.3.0",
3+
"version": "0.4.0-beta.0",
44
"license": "MIT",
55
"author": "Evan You",
66
"contributors": [

packages/plugin-react-oxc/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ export default function viteReact(opts: Options = {}): Plugin[] {
6262
},
6363
}
6464
},
65+
configResolved(config) {
66+
config.logger.warn(
67+
'@vitejs/plugin-react-oxc is deprecated. ' +
68+
'Please use @vitejs/plugin-react instead. ' +
69+
'The changes of this plugin is now included in @vitejs/plugin-react.',
70+
)
71+
},
6572
options() {
6673
if (!this.meta.rolldownVersion) {
6774
throw new Error(

packages/plugin-react-swc/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
## 4.0.0-beta.0 (2025-07-28)
6+
57
### Require Node 20.19+, 22.12+
68

79
This plugin now requires Node 20.19+ or 22.12+.

packages/plugin-react-swc/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vitejs/plugin-react-swc",
3-
"version": "3.11.0",
3+
"version": "4.0.0-beta.0",
44
"license": "MIT",
55
"author": "Arnaud Barré (https://github.com/ArnaudBarre)",
66
"description": "Speed up your Vite dev server with SWC",
@@ -33,7 +33,7 @@
3333
"homepage": "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc#readme",
3434
"dependencies": {
3535
"@rolldown/pluginutils": "1.0.0-beta.29",
36-
"@swc/core": "^1.12.11"
36+
"@swc/core": "^1.13.2"
3737
},
3838
"peerDependencies": {
3939
"vite": "^4 || ^5 || ^6 || ^7"

packages/plugin-react-swc/playground/emotion-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"@types/react": "^19.1.8",
1818
"@types/react-dom": "^19.1.6",
1919
"@vitejs/plugin-react-swc": "../../dist",
20-
"@swc/plugin-emotion": "^10.0.3"
20+
"@swc/plugin-emotion": "^11.0.0"
2121
}
2222
}

packages/plugin-react-swc/playground/styled-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"styled-components": "^6.1.19"
1515
},
1616
"devDependencies": {
17-
"@swc/plugin-styled-components": "^8.0.3",
17+
"@swc/plugin-styled-components": "^9.0.0",
1818
"@types/react": "^19.1.8",
1919
"@types/react-dom": "^19.1.6",
2020
"@types/styled-components": "^5.1.34",

packages/plugin-react-swc/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ type Options = {
7878
useAtYourOwnRisk_mutateSwcOptions?: (options: SWCOptions) => void
7979

8080
/**
81-
* If set, disables the recommendation to use `@vitejs/plugin-react-oxc`
81+
* If set, disables the recommendation to use `@vitejs/plugin-react`
8282
*/
8383
disableOxcRecommendation?: boolean
8484
}
@@ -158,7 +158,7 @@ const react = (_options?: Options): Plugin[] => {
158158
!options.disableOxcRecommendation
159159
) {
160160
config.logger.warn(
161-
'[vite:react-swc] We recommend switching to `@vitejs/plugin-react-oxc` for improved performance as no swc plugins are used. More information at https://vite.dev/rolldown',
161+
'[vite:react-swc] We recommend switching to `@vitejs/plugin-react` for improved performance as no swc plugins are used. More information at https://vite.dev/rolldown',
162162
)
163163
}
164164
},

0 commit comments

Comments
 (0)