Skip to content

fix(deploy): serve prerendered pages from static assets on Cloudflare - #57

Merged
moshiur01 merged 1 commit into
mainfrom
fix/cloudflare-prerendered-cache
Nov 18, 2026
Merged

moshiur01 merged 1 commit into
mainfrom
fix/cloudflare-prerendered-cache

Conversation

@moshiur01

Copy link
Copy Markdown
Contributor

Summary

docora reads content/ from disk while rendering. A Worker has no disk, so every page on https://tween-ui-docs.mr-moshiur314.workers.dev returned 500 with no such file or directory, readdir '/bundle/content'.

This switches OpenNext to the static assets incremental cache with cache interception, so the pages prerendered at build time are served straight from Workers assets.

Testing

Checked on the Cloudflare preview for this branch:

  • 200: /, /component/sliding-tabs, /llms.txt, /api/search
  • Still failing: unknown URLs return 500 instead of 404 (the root layout reads content/ for navigation), and /og exceeds the Free plan's CPU limit (error 1102). /mcp also needs disk access but is paused.

🤖 Generated with Claude Code

docora reads content/ from disk while rendering, which fails on Workers
with "no such file or directory, readdir '/bundle/content'". Use the
static assets incremental cache so prerendered pages are served from
Workers assets instead of being re-rendered per request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@moshiur01
moshiur01 merged commit bb41529 into main Nov 18, 2026
1 of 2 checks passed
@moshiur01
moshiur01 deleted the fix/cloudflare-prerendered-cache branch November 18, 2026 18:39
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