Skip to content

Commit b002c6d

Browse files
committed
Merge branch 'main' into fix-inline-async
2 parents 756adf2 + 7517103 commit b002c6d

File tree

11 files changed

+783
-572
lines changed

11 files changed

+783
-572
lines changed

.github/workflows/issue-labeled.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,14 @@ jobs:
2424
labels: "pending triage, need reproduction"
2525

2626
- name: remove pending
27-
if: contains(github.event.label.description, '(priority)') && contains(github.event.issue.labels.*.name, 'pending triage')
27+
if: (github.event.label.name == 'enhancement' || contains(github.event.label.description, '(priority)')) && contains(github.event.issue.labels.*.name, 'pending triage')
2828
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3
2929
with:
3030
actions: "remove-labels"
3131
token: ${{ secrets.GITHUB_TOKEN }}
3232
issue-number: ${{ github.event.issue.number }}
3333
labels: "pending triage"
3434

35-
- name: remove enhancement pending
36-
if: "(github.event.label.name == 'enhancement' || contains(github.event.label.description, '(priority)')) && contains(github.event.issue.labels.*.name, 'enhancement: pending triage')"
37-
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3
38-
with:
39-
actions: "remove-labels"
40-
token: ${{ secrets.GITHUB_TOKEN }}
41-
issue-number: ${{ github.event.issue.number }}
42-
labels: "enhancement: pending triage"
43-
4435
- name: need reproduction
4536
if: github.event.label.name == 'need reproduction'
4637
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"engines": {
66
"node": "^14.18.0 || >=16.0.0"
77
},
8-
"packageManager": "pnpm@10.8.1",
8+
"packageManager": "pnpm@10.9.0",
99
"homepage": "https://github.com/vitejs/vite-plugin-react/",
1010
"keywords": [
1111
"frontend",
@@ -32,26 +32,26 @@
3232
"ci-publish": "tsx scripts/publishCI.ts"
3333
},
3434
"devDependencies": {
35-
"@eslint/js": "^9.24.0",
35+
"@eslint/js": "^9.25.1",
3636
"@types/fs-extra": "^11.0.4",
37-
"@types/node": "^22.14.1",
37+
"@types/node": "^22.15.2",
3838
"@vitejs/release-scripts": "^1.5.0",
39-
"eslint": "^9.24.0",
40-
"eslint-plugin-import-x": "^4.10.3",
39+
"eslint": "^9.25.1",
40+
"eslint-plugin-import-x": "^4.11.0",
4141
"eslint-plugin-n": "^17.17.0",
4242
"eslint-plugin-regexp": "^2.7.0",
4343
"fs-extra": "^11.3.0",
4444
"globals": "^16.0.0",
4545
"lint-staged": "^15.5.1",
4646
"picocolors": "^1.1.1",
47-
"playwright-chromium": "^1.51.1",
47+
"playwright-chromium": "^1.52.0",
4848
"prettier": "^3.0.3",
49-
"simple-git-hooks": "^2.12.1",
49+
"simple-git-hooks": "^2.13.0",
5050
"tsx": "^4.19.3",
5151
"typescript": "^5.8.3",
52-
"typescript-eslint": "^8.30.1",
53-
"vite": "^6.2.6",
54-
"vitest": "^3.1.1"
52+
"typescript-eslint": "^8.31.0",
53+
"vite": "^6.3.3",
54+
"vitest": "^3.1.2"
5555
},
5656
"simple-git-hooks": {
5757
"pre-commit": "pnpm exec lint-staged --concurrent false"

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"vite": "^4.2.0 || ^5.0.0 || ^6.0.0"
1212
},
1313
"devDependencies": {
14-
"vite": "^6.2.6"
14+
"vite": "^6.3.3"
1515
}
1616
}

packages/common/warning.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ export const silenceUseClientWarning = (
77
onwarn(warning, defaultHandler) {
88
if (
99
warning.code === 'MODULE_LEVEL_DIRECTIVE' &&
10-
warning.message.includes('use client')
10+
(warning.message.includes('use client') ||
11+
warning.message.includes('use server'))
1112
) {
1213
return
1314
}

packages/plugin-react-swc/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@
2929
},
3030
"homepage": "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc#readme",
3131
"dependencies": {
32-
"@swc/core": "^1.11.21"
32+
"@swc/core": "^1.11.22"
3333
},
3434
"peerDependencies": {
3535
"vite": "^4 || ^5 || ^6"
3636
},
3737
"devDependencies": {
38-
"@playwright/test": "^1.51.1",
38+
"@playwright/test": "^1.52.0",
3939
"@types/fs-extra": "^11.0.4",
40-
"@types/node": "^22.14.1",
40+
"@types/node": "^22.15.2",
4141
"@vitejs/react-common": "workspace:*",
42-
"esbuild": "^0.25.2",
42+
"esbuild": "^0.25.3",
4343
"fs-extra": "^11.3.0",
4444
"picocolors": "^1.1.1",
4545
"prettier": "^3.0.3",
4646
"typescript": "^5.8.3",
47-
"vite": "^6.2.6"
47+
"vite": "^6.3.3"
4848
}
4949
}

packages/plugin-react-swc/playground/ts-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"generouted": "1.11.7",
1313
"react": "^19.1.0",
1414
"react-dom": "^19.1.0",
15-
"react-router-dom": "^7.5.0"
15+
"react-router-dom": "^7.5.2"
1616
},
1717
"devDependencies": {
1818
"@types/react": "^19.1.2",

packages/plugin-react/src/index.ts

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { readFileSync } from 'node:fs'
44
import type * as babelCore from '@babel/core'
55
import type { ParserOptions, TransformOptions } from '@babel/core'
66
import { createFilter } from 'vite'
7+
import * as vite from 'vite'
78
import type { Plugin, PluginOption, ResolvedConfig } from 'vite'
89
import {
910
addRefreshWrapper,
@@ -124,10 +125,24 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
124125
enforce: 'pre',
125126
config() {
126127
if (opts.jsxRuntime === 'classic') {
127-
return {
128-
esbuild: {
129-
jsx: 'transform',
130-
},
128+
if ('rolldownVersion' in vite) {
129+
return {
130+
oxc: {
131+
jsx: {
132+
runtime: 'classic',
133+
// disable __self and __source injection even in dev
134+
// as this plugin injects them by babel and oxc will throw
135+
// if development is enabled and those properties are already present
136+
development: false,
137+
},
138+
},
139+
}
140+
} else {
141+
return {
142+
esbuild: {
143+
jsx: 'transform',
144+
},
145+
}
131146
}
132147
} else {
133148
return {
@@ -203,14 +218,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
203218
])
204219
}
205220

206-
if (
207-
opts.jsxRuntime === 'classic' &&
208-
isJSX &&
209-
// OXC injects self and source so these plugins are not needed for rolldown-vite
210-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
211-
// @ts-ignore -- this.meta.rolldownVersion only exists in rolldown-vite
212-
!this.meta.rolldownVersion
213-
) {
221+
if (opts.jsxRuntime === 'classic' && isJSX) {
214222
if (!isProduction) {
215223
// These development plugins are only needed for the classic runtime.
216224
plugins.push(

playground/compiler-react-18/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
},
1010
"dependencies": {
1111
"react": "^18.3.1",
12-
"react-compiler-runtime": "19.0.0-beta-ebf51a3-20250411",
12+
"react-compiler-runtime": "19.1.0-rc.1",
1313
"react-dom": "^18.3.1"
1414
},
1515
"devDependencies": {
1616
"@babel/plugin-transform-react-jsx-development": "^7.25.9",
1717
"@types/react": "^18.3.20",
1818
"@types/react-dom": "^18.3.6",
1919
"@vitejs/plugin-react": "workspace:*",
20-
"babel-plugin-react-compiler": "19.0.0-beta-ebf51a3-20250411",
20+
"babel-plugin-react-compiler": "19.1.0-rc.1",
2121
"typescript": "^5.8.3"
2222
}
2323
}

playground/compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@types/react": "^19.1.2",
1717
"@types/react-dom": "^19.1.2",
1818
"@vitejs/plugin-react": "workspace:*",
19-
"babel-plugin-react-compiler": "19.0.0-beta-ebf51a3-20250411",
19+
"babel-plugin-react-compiler": "19.1.0-rc.1",
2020
"typescript": "^5.8.3"
2121
}
2222
}

0 commit comments

Comments
 (0)