diff --git a/example/index.ts b/example/index.ts index f688a8b..9c20b7a 100644 --- a/example/index.ts +++ b/example/index.ts @@ -8,6 +8,7 @@ Bun.serve({ const response = await router.serve(request, { Shell: ExampleShell, bootstrapModules: ["/hydrate.js"], + noStreaming: true }); if (response) return response; return new Response("Not found", { diff --git a/index.tsx b/index.tsx index 0298af6..5147e1d 100644 --- a/index.tsx +++ b/index.tsx @@ -111,7 +111,12 @@ export class StaticRouters { } ); if (noStreaming) { - await stream.allReady; + return new Response(await Bun.readableStreamToBlob(stream), { + headers: { + "Content-Type": "text/html; charset=utf-8", + "Cache-Control": "no-store", + }, + }); } return new Response(stream, { headers: {