Skip to content

Commit 80e03b3

Browse files
committed
fix noStreaming
1 parent bee95e7 commit 80e03b3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

example/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Bun.serve({
88
const response = await router.serve(request, {
99
Shell: ExampleShell,
1010
bootstrapModules: ["/hydrate.js"],
11+
noStreaming: true
1112
});
1213
if (response) return response;
1314
return new Response("Not found", {

index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ export class StaticRouters {
111111
}
112112
);
113113
if (noStreaming) {
114-
await stream.allReady;
114+
return new Response(await Bun.readableStreamToBlob(stream), {
115+
headers: {
116+
"Content-Type": "text/html; charset=utf-8",
117+
"Cache-Control": "no-store",
118+
},
119+
});
115120
}
116121
return new Response(stream, {
117122
headers: {

0 commit comments

Comments
 (0)