| 1 | import { createElement } from "react"; |
| 2 | import { renderToStaticMarkup } from "react-dom/server.edge"; |
| 3 | |
| 4 | // Lives in the `ssr` environment (no `react-server` condition), so it can use |
| 5 | // `react-dom/server` — which would fail if imported directly in the worker's |
| 6 | // `rsc` entry. The worker reaches it via `loadModule("ssr", "worker-ssr")`. |
| 7 | export function renderWorkerHtml(): string { |
| 8 | return renderToStaticMarkup( |
| 9 | createElement("section", null, "Worker render via the ssr environment."), |
| 10 | ); |
| 11 | } |