Skip to content

fix: resolve ssr:false prerender error for docs/manual/api route#1242

Merged
jderochervlk merged 2 commits intovlk/split-out-api-overviewfrom
copilot/fix-build-error
Apr 9, 2026
Merged

fix: resolve ssr:false prerender error for docs/manual/api route#1242
jderochervlk merged 2 commits intovlk/split-out-api-overviewfrom
copilot/fix-build-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

docs/manual/api was registered twice in the route manifest — once explicitly as ApiOverviewRoute and again via Server.routes() (react-router-mdx) because markdown-pages/docs/manual/api.mdx exists. React Router's prerender validation matches each path to exactly one route ID; the MdxRoute entry won the match, leaving api-overview outside prerenderedRoutes. With ssr:false, any route that has a loader but isn't prerendered is invalid → build error.

Changes

  • app/routes.res — extend the mdxRoutes filter to also exclude docs/manual/api, mirroring how blog and community are already excluded:

    path === "blog" ||
    String.startsWith(path, "blog/") ||
    path === "community" ||
    String.startsWith(path, "community/") ||
    path === "docs/manual/api"   // ← added
  • app/routes/ApiOverviewRoute.resi — add the missing interface file. Every other route module has one; the absence here left module exports uncontrolled and broke Vite HMR.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.rescript-lang.org
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node /home/REDACTED/work/rescript-lang.org/rescript-lang.org/node_modules/@react-router/dev/bin.js build es/@rescript/lin-runtime-path conf�� --local committer.email g.org/node_modul-I es/@rescript/runreact-router g.org/node_modulbuild es/@rescript/rea4 g.org/node_modul-bs-jsx-preserve es/@�� --noprofile (dns block)
  • download.cypress.io
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node dist/index.js --exec install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix build error in Rescript project fix: resolve ssr:false prerender error for docs/manual/api route Apr 9, 2026
Copilot AI requested a review from jderochervlk April 9, 2026 22:20
@jderochervlk jderochervlk added the ok-to-deploy Trigger deployment if you are sure a PR is safe to deploy. label Apr 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Cloudflare deployment

Deployement ID: 4f034537-c471-4423-a90d-0625361d6b61
Deployment Environment: preview

⛅️ wrangler 4.63.0 (update available 4.81.1)
─────────────────────────────────────────────
✨ Compiled Worker successfully
Uploading... (7187/7662)
Uploading... (7345/7662)
Uploading... (7504/7662)
Uploading... (7662/7662)
✨ Success! Uploaded 475 files (7187 already uploaded) (5.32 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://4f034537.rescript-lang.pages.dev
✨ Deployment alias URL: https://copilot-fix-build-error.rescript-lang.pages.dev

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

Deploying rescript-lang-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: b698d8d
Status: ✅  Deploy successful!
Preview URL: https://4bba8c52.rescript-lang.pages.dev
Branch Preview URL: https://head.rescript-lang.pages.dev

View logs

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Fork PR Cloudflare deployment

PR: #1242
Deployement ID: 4bba8c52-f5aa-48d8-b3e8-c378176e10f0
Deployment Environment: preview

⛅️ wrangler 4.61.1 (update available 4.81.1)
─────────────────────────────────────────────
✨ Compiled Worker successfully
Uploading... (7191/7662)
Uploading... (7348/7662)
Uploading... (7505/7662)
Uploading... (7662/7662)
✨ Success! Uploaded 471 files (7191 already uploaded) (4.85 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://4bba8c52.rescript-lang.pages.dev
✨ Deployment alias URL: https://head.rescript-lang.pages.dev

@jderochervlk jderochervlk marked this pull request as ready for review April 9, 2026 23:12
@jderochervlk jderochervlk merged commit c39224a into vlk/split-out-api-overview Apr 9, 2026
8 checks passed
@jderochervlk jderochervlk deleted the copilot/fix-build-error branch April 9, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-deploy Trigger deployment if you are sure a PR is safe to deploy.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants