diff options
Diffstat (limited to 'cli/bench/testdata/bun_reactdom_ssr.jsx')
-rw-r--r-- | cli/bench/testdata/bun_reactdom_ssr.jsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/bench/testdata/bun_reactdom_ssr.jsx b/cli/bench/testdata/bun_reactdom_ssr.jsx new file mode 100644 index 000000000..e721033a2 --- /dev/null +++ b/cli/bench/testdata/bun_reactdom_ssr.jsx @@ -0,0 +1,23 @@ +// Bun uses a custom non-portable react-dom fork. +// TODO(@littledivy): Reenable this when it stops segfaulting. +import { renderToReadableStream } from "./react-dom.js"; +const headers = { + headers: { + "Content-Type": "text/html", + }, +}; + +const App = () => ( + <html> + <body> + <h1>Hello World</h1> + </body> + </html> +); + +Bun.serve({ + async fetch(req) { + return new Response(await renderToReadableStream(<App />), headers); + }, + port: 9000, +}); |