vite-plugin-react
vite-plugin-react copied to clipboard
feat(rsc): react-router cloudflare single worker example
Description
Summary
- port "single worker" setup from
examples/cf-single-workertoexamples/react-router, namely enableloadModuleDevProxy. - update react-router
entry.ssrto providegenerateHTML, which works on "serializable" values-
generateHTML: (url: string, headers: Headers, rscResponse: Response) => Promise<Response>
-
- update
utils/rpc.tsto encode/decodeHeadersandResponsevia custom turbo-stream plugins
@hi-ogawa I wonder if latest RR that supports framework mode can have example like this one too?
I just wanted to mention that I tried this one. Works compiled but not in dev when @clouldfware/vite-plugin is used. It doesn't say an error and just prints <..redacted..>
@ivogt Hey, Sorry, I missed the message. To answer the question, no. RR framework plugin needs a change to support a setup like this. You can probably raise a feature request on react router repo.