Skip to content

Commit 82d0cb1

Browse files
committed
test: update example
1 parent 57e19ed commit 82d0cb1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/plugin-rsc/examples/starter/src/framework/entry.rsc.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ export default async function handler(request: Request): Promise<Response> {
9494
}
9595

9696
// Delegate to SSR environment for html rendering.
97-
// The plugin provides `loadModule` helper to allow loading SSR environment entry module
97+
// The plugin provides `viteRsc.import` helper to allow loading SSR environment entry module
9898
// in RSC environment. however this can be customized by implementing own runtime communication
9999
// e.g. `@cloudflare/vite-plugin`'s service binding.
100-
const ssrEntryModule = await import.meta.viteRsc.loadModule<
100+
const ssrEntryModule = await import.meta.viteRsc.import<
101101
typeof import('./entry.ssr.tsx')
102-
>('ssr', 'index')
102+
>('./entry.ssr.tsx', { environment: 'ssr' })
103103
const ssrResult = await ssrEntryModule.renderHTML(rscStream, {
104104
formState,
105105
// allow quick simulation of javascript disabled browser

packages/plugin-rsc/examples/starter/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default defineConfig({
4747
build: {
4848
rollupOptions: {
4949
input: {
50-
index: './src/framework/entry.ssr.tsx',
50+
// index: './src/framework/entry.ssr.tsx',
5151
},
5252
},
5353
},

0 commit comments

Comments
 (0)