Skip to content

Commit 6607331

Browse files
authored
Merge branch 'main' into 10-01-feat_expose_virtual_for_simpler_preamble_setup_on_ssr
2 parents 21d2a57 + 91bcc08 commit 6607331

File tree

22 files changed

+320
-77
lines changed

22 files changed

+320
-77
lines changed

.github/renovate.json5

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"react-dom",
3939
"@types/react",
4040
"@types/react-dom",
41-
"react-is",
4241
"react-refresh",
4342
"react-server-dom-webpack",
4443
"use-sync-external-store",

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"dependencies": {
1111
"react": "^19.1.1",
1212
"react-dom": "^19.1.1",
13-
"react-is": "^19.1.1",
1413
"styled-components": "^6.1.19"
1514
},
1615
"devDependencies": {

packages/plugin-rsc/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## <small>[0.4.33](https://github.com/vitejs/vite-plugin-react/compare/[email protected]@0.4.33) (2025-10-08)</small>
2+
### Bug Fixes
3+
4+
* **deps:** update all non-major dependencies ([#887](https://github.com/vitejs/vite-plugin-react/issues/887)) ([407795d](https://github.com/vitejs/vite-plugin-react/commit/407795dbd0129b069cf3ac842846687485a5ef00))
5+
* **deps:** update all non-major dependencies ([#896](https://github.com/vitejs/vite-plugin-react/issues/896)) ([2d239fc](https://github.com/vitejs/vite-plugin-react/commit/2d239fc8dec2ab499282eaea45b2bffb8d182f26))
6+
* **rsc/cjs:** add `__filename` and `__dirname` ([#908](https://github.com/vitejs/vite-plugin-react/issues/908)) ([0ba0d71](https://github.com/vitejs/vite-plugin-react/commit/0ba0d71bc92822946f327760691db3d6f7d87106))
7+
* **rsc/cjs:** unwrap `default` based on `__cjs_module_runner_transform` marker ([#905](https://github.com/vitejs/vite-plugin-react/issues/905)) ([1216caf](https://github.com/vitejs/vite-plugin-react/commit/1216caf70621b8760c4226624939b77e7ece4f42))
8+
9+
### Code Refactoring
10+
11+
* **rsc:** move common code for `transformCjsToEsm` ([#909](https://github.com/vitejs/vite-plugin-react/issues/909)) ([ac61c62](https://github.com/vitejs/vite-plugin-react/commit/ac61c624d8a7f860af735ad288491b5c50c656bb))
12+
113
## <small>[0.4.32](https://github.com/vitejs/vite-plugin-react/compare/[email protected]@0.4.32) (2025-09-26)</small>
214
### Bug Fixes
315

packages/plugin-rsc/e2e/react-router.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ test.describe('build-cloudflare', () => {
3939
})
4040

4141
function defineTest(f: Fixture) {
42-
test('loader', async ({ page }) => {
43-
await page.goto(f.url())
44-
await expect(page.getByText(`loaderData: {"name":"Unknown"}`)).toBeVisible()
45-
})
46-
4742
test('client', async ({ page }) => {
4843
await page.goto(f.url('./about'))
4944
await waitForHydration(page)

packages/plugin-rsc/examples/basic/wrangler.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"directory": "dist/client",
77
},
88
"workers_dev": true,
9-
"compatibility_date": "2025-04-01",
9+
"compatibility_date": "2025-10-01",
1010
"compatibility_flags": ["nodejs_als"],
1111
}

packages/plugin-rsc/examples/react-router/app/root.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { TestClientState, TestHydrated } from './routes/client'
44
import { DumpError, GlobalNavigationLoadingBar } from './routes/root.client'
55

66
export function Layout({ children }: { children: React.ReactNode }) {
7-
console.log('Layout')
7+
console.log('[debug] root - Layout')
88
return (
99
<html lang="en">
1010
<head>
@@ -41,7 +41,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
4141
}
4242

4343
export default function Component() {
44-
console.log('Root')
44+
console.log('[debug] root - Component')
4545
return (
4646
<>
4747
<Outlet />

packages/plugin-rsc/examples/react-router/app/routes/home.actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
export async function sayHello(defaultName: string, formData: FormData) {
44
await new Promise((resolve) => setTimeout(resolve, 500))
55
const name = formData.get('name') || defaultName
6-
console.log(`Hello, ${name}`)
6+
console.log(`[debug] sayHello - ${name}`)
77
}

packages/plugin-rsc/examples/react-router/app/routes/home.tsx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
1-
namespace Route {
2-
export type LoaderArgs = any
3-
export type ComponentProps = any
4-
}
5-
61
import { sayHello } from './home.actions.ts'
72
import { PendingButton } from './home.client.tsx'
83
import './home.css'
94
import { TestActionStateServer } from './test-action-state/server.tsx'
105

11-
export function loader({ request }: Route.LoaderArgs) {
12-
const url = new URL(request.url)
13-
const name = url.searchParams.get('name')
14-
return { name: name || 'Unknown' }
15-
}
16-
17-
const Component = ({ loaderData }: Route.ComponentProps) => {
6+
const Component = () => {
187
return (
198
<main className="container my-8 px-8 mx-auto">
209
<article className="paper prose max-w-none">
2110
<h1>Home</h1>
2211
<p>This is the home page.</p>
2312
<span className="test-style-home">[test-style-home]</span>
24-
<pre>
25-
<code>loaderData: {JSON.stringify(loaderData)}</code>
26-
</pre>
2713
<h2>Server Action</h2>
2814
<form
2915
className="no-prose grid gap-6"
30-
action={sayHello.bind(null, loaderData.name)}
16+
action={sayHello.bind(null, 'Demo')}
3117
>
3218
<div className="grid gap-1">
3319
<label className="label" htmlFor="name">
@@ -38,7 +24,7 @@ const Component = ({ loaderData }: Route.ComponentProps) => {
3824
id="name"
3925
type="text"
4026
name="name"
41-
placeholder={loaderData.name}
27+
placeholder={'Demo'}
4228
/>
4329
</div>
4430
<div>

packages/plugin-rsc/examples/react-router/cf/wrangler.rsc.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"name": "vite-rsc-react-router-rsc",
44
"main": "./entry.rsc.tsx",
55
"workers_dev": true,
6-
"compatibility_date": "2025-04-01",
6+
"compatibility_date": "2025-10-01",
77
"compatibility_flags": ["nodejs_als"],
88
}

packages/plugin-rsc/examples/react-router/cf/wrangler.ssr.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"main": "./entry.ssr.tsx",
55
"workers_dev": true,
66
"services": [{ "binding": "RSC", "service": "vite-rsc-react-router-rsc" }],
7-
"compatibility_date": "2025-04-01",
7+
"compatibility_date": "2025-10-01",
88
"compatibility_flags": ["nodejs_als"],
99
}

0 commit comments

Comments
 (0)