Skip to content

Commit c30cf1a

Browse files
n9hi-ogawa
andauthored
chore(rsc): add missing rsc-html-stream dep (fix #857) (#868)
Co-authored-by: Hiroshi Ogawa <[email protected]>
1 parent a2a287a commit c30cf1a

File tree

3 files changed

+51
-570
lines changed

3 files changed

+51
-570
lines changed

packages/plugin-rsc/e2e/isolated.test.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { defineStarterTest } from './starter'
44
import path from 'node:path'
55
import os from 'node:os'
66
import * as vite from 'vite'
7+
import { waitForHydration } from './helper'
78

89
test.describe(() => {
910
// use RUNNER_TEMP on Github Actions
@@ -54,3 +55,34 @@ test.describe('vite 6', () => {
5455
defineStarterTest(f)
5556
})
5657
})
58+
59+
test.describe('examples/ssg', () => {
60+
const tmpRoot = path.join(
61+
process.env['RUNNER_TEMP'] || os.tmpdir(),
62+
'test-vite-rsc-ssg',
63+
)
64+
test.beforeAll(async () => {
65+
await setupIsolatedFixture({
66+
src: 'examples/ssg',
67+
dest: tmpRoot,
68+
})
69+
})
70+
71+
test.describe('dev', () => {
72+
const f = useFixture({ root: tmpRoot, mode: 'dev' })
73+
74+
test('basic', async ({ page }) => {
75+
await page.goto(f.url())
76+
await waitForHydration(page)
77+
})
78+
})
79+
80+
test.describe('build', () => {
81+
const f = useFixture({ root: tmpRoot, mode: 'build' })
82+
83+
test('basic', async ({ page }) => {
84+
await page.goto(f.url())
85+
await waitForHydration(page)
86+
})
87+
})
88+
})

packages/plugin-rsc/examples/ssg/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
"@types/react": "^19.1.12",
1919
"@types/react-dom": "^19.1.9",
2020
"@vitejs/plugin-react": "latest",
21-
"@vitejs/plugin-rsc": "latest"
21+
"@vitejs/plugin-rsc": "latest",
22+
"rsc-html-stream": "^0.0.7",
23+
"vite": "^7.1.5"
2224
}
2325
}

0 commit comments

Comments
 (0)