Skip to content

[codex] add Cloudflare SSR for playground - #1303

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

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

Conversation

@jderochervlk

@jderochervlk jderochervlk commented May 20, 2026

Copy link
Copy Markdown
Collaborator

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.

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

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

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

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

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
guide 055055f Commit Preview URL

Branch Preview URL
Sep 14 2026, 01:38 PM

@jderochervlk

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T13:19:27.986408Z 2621ca1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2621ca1941

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/docs/server/react-router-handler.js
Comment thread apps/docs/react-router.config.mjs
Comment thread apps/docs/react-router.config.mjs
Comment thread apps/docs/app/entry.server.js
@github-actions

Copy link
Copy Markdown
Contributor

Guide Cloudflare deployment

⛅️ wrangler 4.114.0
────────────────────
🌀 Building list of assets...
✨ Read 16 files from the assets directory /home/runner/work/rescript-lang.org/rescript-lang.org/apps/guide/out
🌀 Starting asset upload...
No updated asset files to upload. Proceeding with deployment...
Total Upload: 0.31 KiB / gzip: 0.22 KiB
Worker Startup Time: 0 ms
Uploaded guide (1.36 sec)
Worker Version ID: 3ac5dc19-5ff9-4499-a00c-aef7bf335a87
Version Preview URL: https://3ac5dc19-guide.rescript.workers.dev
Version Preview Alias URL: https://vlk-enable-cloudflare-ssr-guide.rescript.workers.dev

To deploy this version to production traffic use the command wrangler versions deploy

Changes to non-versioned settings (config properties 'logpush' or 'tail_consumers') take effect after your next deployment using the command wrangler versions deploy

Changes to triggers (routes, custom domains, cron schedules, etc) must be applied with the command wrangler triggers deploy

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare deployment

Deployement ID: f20de0bc-3d65-44d7-b093-4017a57aadad
Deployment Environment: preview

⛅️ wrangler 4.114.0
────────────────────
Uploading... (8764/8767)
Uploading... (8765/8767)
Uploading... (8766/8767)
Uploading... (8767/8767)
✨ Success! Uploaded 3 files (8764 already uploaded) (6.95 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://f20de0bc.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