Skip to content

Commit 23e4e61

Browse files
fix(start): replay rsbuild server function metadata from rspack cache
1 parent 015b016 commit 23e4e61

11 files changed

Lines changed: 945 additions & 50 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@tanstack/start-plugin-core': patch
3+
'@tanstack/react-start': patch
4+
'@tanstack/solid-start': patch
5+
'@tanstack/vue-start': patch
6+
---
7+
8+
Fix Rsbuild server function metadata replay when Rspack restores modules from its persistent cache.
9+
10+
Server function metadata is now stored on Rspack module build info and replayed from cached modules before resolver modules are rebuilt, preventing warm restarts from losing server function registrations.

‎e2e/react-start/server-functions/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"build:rsbuild": "rsbuild build && tsc --noEmit",
1414
"preview": "vite preview",
1515
"start": "node server.js",
16-
"test:e2e": "rm -rf port*.txt && pnpm build && playwright test --project=chromium"
16+
"test:e2e": "rm -rf port*.txt && pnpm build && playwright test --project=chromium && pnpm run test:e2e:rsbuild-cache",
17+
"test:e2e:rsbuild-cache": "playwright test -c playwright.rsbuild-cache.config.ts --project=chromium"
1718
},
1819
"dependencies": {
1920
"@tanstack/react-query": "^5.90.0",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { defineConfig, devices } from '@playwright/test'
2+
3+
export default defineConfig({
4+
testDir: './tests',
5+
testMatch: /rsbuild-cache\.spec\.ts/,
6+
timeout: 120_000,
7+
workers: 1,
8+
reporter: [['line']],
9+
projects: [
10+
{
11+
name: 'chromium',
12+
use: { ...devices['Desktop Chrome'] },
13+
},
14+
],
15+
})

‎e2e/react-start/server-functions/rsbuild.config.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ export default defineConfig({
1313
root: outDir,
1414
},
1515
},
16+
performance: {
17+
buildCache: process.env.E2E_RSBUILD_BUILD_CACHE !== 'false',
18+
},
1619
})

0 commit comments

Comments
 (0)