Cloudflare Pages Server Side Rendering

is it possible to have SSR in Cloudflare pages? I tried using Next.js in Cloudflare pages, it only supports hosting plain HTML export of Next.js, nothing else.
is there any option to use Cloudflare worker for server-side rendering?

1 Like

Cloudflare does offer Flareact which they say:

Flareact is modeled after the terrific Next.js project and its APIs. If you’re transitioning from Next.js, a lot of the APIs will seem familiar, if not identical !

I would give it a look.

1 Like

Flareact isn’t a Cloudflare official project, I don’t think they have any plan for supporting frameworks like React or Vue.js in Workers.
I tried Flareact one of the issues I had was when I published my app to Edge (worker), useEffect hook didn’t work and I couldn’t find any solution for it, one other things it does have some weird bugs,

Pages does intend to support SSR frameworks in the future. There is no known ETA for this right now.

There have been people experimenting with this using Workers (Example: Server Side Rendering Vue.js 3.2+ on Cloudflare Workers with pipeToWebWritable)

There is no official solution right now though, your best bet would be to use Workers.

2 Likes