Skip to content

[codex] add Cloudflare SSR for playground#1303

Draft
jderochervlk wants to merge 2 commits into
masterfrom
vlk/enable-cloudflare-ssr
Draft

[codex] add Cloudflare SSR for playground#1303
jderochervlk wants to merge 2 commits into
masterfrom
vlk/enable-cloudflare-ssr

Conversation

@jderochervlk
Copy link
Copy Markdown
Collaborator

@jderochervlk jderochervlk commented May 20, 2026

Context

This is the first slice of the playground SSR work. The docs app can keep prerendering static routes while letting /try run through Cloudflare Pages Functions.

Summary

  • Enables React Router SSR for @rescript-lang/docs.
  • Omits /try from React Router prerender output while keeping the existing stdlib prerender paths.
  • Adds a Cloudflare Pages SSR entry/function path for /try and /try.data.
  • Adds wrangler.toml for local Pages dev/deploy, including nodejs_compat and the Pages project name.
  • Clears out before copying build/client so stale prerendered /try artifacts do not survive rebuilds.
  • Formats the v12.3 API JSON files that were failing the existing full-repo format CI job.

Validation

  • node .yarn/releases/yarn-4.13.0.cjs build:res
  • node .yarn/releases/yarn-4.13.0.cjs workspace @rescript-lang/docs build:vite
  • node_modules/.bin/oxfmt --check apps/docs/react-router.config.mjs apps/docs/app/entry.server.js apps/docs/server/react-router-handler.js apps/docs/functions/try.js apps/docs/functions/try.data.js
  • yarn ci:format
  • Wrangler Pages smoke test from fresh out: /, /try, and /try.data returned 200; /try.data included bundleBaseUrl and versions loader data.

No generated .jsx files are included in this PR.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 20, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
guide fb02aa1 May 20 2026, 08:52 PM

@jderochervlk jderochervlk force-pushed the vlk/enable-cloudflare-ssr branch from 1990b3b to 0aefaa6 Compare May 20, 2026 14:27
@github-actions
Copy link
Copy Markdown

Cloudflare deployment

Deployement ID: 0baf752a-e62c-4df2-b71a-a9377f5446cc
Deployment Environment: preview

⛅️ wrangler 4.85.0
───────────────────
Uploading... (8401/8403)
Uploading... (8402/8403)
Uploading... (8403/8403)
✨ Success! Uploaded 2 files (8401 already uploaded) (1.75 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://0baf752a.rescript-lang.pages.dev
✨ Deployment alias URL: https://vlk-enable-cloudflare-ssr.rescript-lang.pages.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant