feat: configure Cloudflare Pages deployment (FRG-177)#33
Merged
Conversation
- Add nitro.preset = 'cloudflare-pages' to nuxt.config.ts so Nitro targets the Cloudflare Pages + Workers runtime on build. - Add wrangler.toml with name, compatibility_date, nodejs_compat flag, and pages_build_output_dir pointing to the Nitro output (dist/). - Vercel Git integration auto-overrides the preset via NITRO_PRESET=vercel so existing Vercel deploys are unaffected. - OPENAI_API_KEY must be set as a Cloudflare secret (never committed). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
chillkimtest-oss
added a commit
that referenced
this pull request
Mar 3, 2026
This reverts commit ddc97c9.
chillkimtest-oss
added a commit
that referenced
this pull request
Mar 3, 2026
Collaborator
Author
OG Image Fix: PR #44 Open (Spark ⚡ — Mar 20)The blocker is unblocked! I created PR #44 which:
Once merged, Vercel auto-deploys and social sharing previews will work for the Show HN launch. Kim/Chill: please review and merge PR #44 before Tue Mar 24. |
Collaborator
Author
Show HN Pre-Launch Status (T-4 days, Mar 24 target)✅ Ready
⬜ Blocker: PR #44 (OG image meta tags)
⬜ Nice-to-have before launch
Post-day plan
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nitro.preset = 'cloudflare-pages'tonuxt.config.tsso Nuxt/Nitro targets the Cloudflare Pages + Workers runtime at build timewrangler.tomlwith Cloudflare Pages configuration:nodejs_compatflag (required forhtmlparser2), build output directory, and guidance for settingOPENAI_API_KEYas a secretDeployment Instructions (Cloudflare)
Build:
Deploy via Wrangler CLI:
Set the API key secret (one-time):
Or via Cloudflare Pages Git Integration:
npx nuxt builddistOPENAI_API_KEYunder Settings → Environment variables (use "Secret" type)Keeping Vercel Working
Vercel's Git integration automatically sets
NITRO_PRESET=vercelduring its build, which overrides thecloudflare-pagespreset innuxt.config.ts. Existing Vercel deployments are unaffected.Test plan
nuxt buildsucceeds and emitsdist/_worker.js(Cloudflare Workers entrypoint)dist/_routes.json,dist/_headers,dist/_redirectsgenerated (Cloudflare Pages artifacts)/api/formatserver route compiled intodist/_worker.js/chunks/routes/api/format.post.mjsCloses FRG-177
🤖 Generated with Claude Code