@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
tsx 12 lines 524 Bytes
Raw
1 import { fetchServer } from "./entry.rsc";
2 import type * as EntrySsr from "./entry.ssr";
3
4 // The distilled Cloudflare worker wrapper expects a `{ fetch }` default export.
5 // The worker runs in the `rsc` environment and loads the `ssr` environment at
6 // runtime to render HTML from the RSC payload.
7 export default {
8 async fetch(request: Request): Promise<Response> {
9 const ssr = await import.meta.viteRsc.loadModule<typeof EntrySsr>("ssr", "index");
10 return ssr.default(request, await fetchServer(request));
11 },
12 };