Prepare website for Cloudflare deploy#134
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR configures the site for Cloudflare Workers static-assets: adds a wrangler.jsonc config pointing to ./dist (auto-trailing-slash, 404-page), updates package.json with Cloudflare build/deploy scripts and adds wrangler to devDependencies, updates pnpm-workspace.yaml to allow workerd builds and exclude specific miniflare/wrangler versions from minimumReleaseAge, expands Cloudflare Cache-Control headers and redirects, and adds website/.gitignore entry to ignore public/react/. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Prepares the website/ package for deployment via Cloudflare Workers Static Assets by adding Wrangler configuration, Cloudflare-oriented build/deploy scripts, and updating static asset redirect/header rules while keeping the existing Vercel workflow available.
Changes:
- Added
wrangler.jsoncand adeploy.cloudflarescript to support Cloudflare Workers Static Assets deployment. - Updated
public/_headersandpublic/_redirectsto align with Workers Static Assets routing/caching behavior. - Updated workspace configuration and lockfile to include
wrangler(and its dependency chain) and allowworkerdbuilds under pnpm’s build allowlist.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/wrangler.jsonc | Adds Wrangler (JSONC) config to serve ./dist via Workers Static Assets with trailing-slash + 404 handling. |
| website/public/_redirects | Adds static redirects intended for Workers Static Assets. |
| website/public/_headers | Adds caching rules for build/assets/fonts/og + Qwik q-data.json responses. |
| website/package.json | Adds build.cloudflare, deploy.cloudflare, and renames Vercel deploy script to deploy.vercel; adds wrangler dev dependency. |
| website/.gitignore | Ignores public/react/ outputs. |
| pnpm-workspace.yaml | Allows workerd builds and pins release-age exclusions for miniflare/wrangler. |
| pnpm-lock.yaml | Lockfile updates for wrangler and related dependencies. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
website/public/_redirects (1)
3-18: ⚡ Quick winConsider using 301 (permanent) redirects for legacy URLs.
All redirects currently use status
302(temporary). If these are permanent URL structure changes (e.g., legacy framework guide paths, deprecated/core/apipath), consider using301(permanent) instead. Permanent redirects:
- Signal to search engines that these URLs have permanently moved
- Allow browsers to cache the redirect
- Improve SEO by transferring page authority to the new URLs
Use
302only if these redirects are temporary or experimental.♻️ Example change to permanent redirects
-/preact/guides /preact/guides/introduction/ 302 -/preact/guides/ /preact/guides/introduction/ 302 +/preact/guides /preact/guides/introduction/ 301 +/preact/guides/ /preact/guides/introduction/ 301🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@website/public/_redirects` around lines 3 - 18, The redirects file currently marks legacy mappings like "/playground /playground/login/ 302", "/preact/guides /preact/guides/introduction/ 302", "/qwik/guides /qwik/guides/introduction/ 302", "/react/guides /react/guides/introduction/ 302", "/solid/guides /solid/guides/introduction/ 302", "/svelte/guides /svelte/guides/introduction/ 302", "/vue/guides /vue/guides/introduction/ 302" and "/core/api /solid/api/ 302" as temporary (302); if these are permanent URL moves, update each corresponding line to use 301 instead of 302 (e.g., change "/playground /playground/login/ 302" → use 301), leaving any entries that are truly temporary as 302. Ensure you update every duplicate variant with and without trailing slashes (both "/playground" and "/playground/") so all legacy forms reflect the chosen permanent (301) status.pnpm-workspace.yaml (1)
15-17: 💤 Low valueminimumReleaseAgeExclude for very recent releases.
The
miniflare@4.20260603.0andwrangler@4.98.0versions appear to be released around June 3, 2026 (based on the version date encoding). Excluding them from minimum release age requirements is appropriate for this migration, but be aware that these are cutting-edge versions.Consider monitoring for any bug reports or patches in the days following this deployment.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm-workspace.yaml` around lines 15 - 17, The workspace YAML currently excludes two very recent releases via the minimumReleaseAgeExclude list; ensure the entries minimumReleaseAgeExclude contains miniflare@4.20260603.0 and wrangler@4.98.0 (as shown) and add a short inline comment above or next to minimumReleaseAgeExclude noting these are cutting-edge temporary exclusions and should be monitored and reviewed for updates/patches in the days after deployment; plan to remove or relax these specific exclusions once stability is confirmed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@website/public/_headers`:
- Around line 12-20: The _headers entry only defines q-data.json caching up to
"/:a/:b/:c/q-data.json", so add additional route-depth rules in
website/public/_headers (e.g., "/:a/:b/:c/:d/q-data.json" and further depths as
needed, e.g., "/:a/:b/:c/:d/:e/q-data.json" or up to
"/:a/:b/:c/:d/:e/:f/q-data.json") with the same Cache-Control: public,
max-age=60, stale-while-revalidate=604800 so q-data.json responses for deeper
routes (referenced by nested routes like the UseFieldConfig properties path)
receive the intended headers.
---
Nitpick comments:
In `@pnpm-workspace.yaml`:
- Around line 15-17: The workspace YAML currently excludes two very recent
releases via the minimumReleaseAgeExclude list; ensure the entries
minimumReleaseAgeExclude contains miniflare@4.20260603.0 and wrangler@4.98.0 (as
shown) and add a short inline comment above or next to minimumReleaseAgeExclude
noting these are cutting-edge temporary exclusions and should be monitored and
reviewed for updates/patches in the days after deployment; plan to remove or
relax these specific exclusions once stability is confirmed.
In `@website/public/_redirects`:
- Around line 3-18: The redirects file currently marks legacy mappings like
"/playground /playground/login/ 302", "/preact/guides
/preact/guides/introduction/ 302", "/qwik/guides /qwik/guides/introduction/
302", "/react/guides /react/guides/introduction/ 302", "/solid/guides
/solid/guides/introduction/ 302", "/svelte/guides /svelte/guides/introduction/
302", "/vue/guides /vue/guides/introduction/ 302" and "/core/api /solid/api/
302" as temporary (302); if these are permanent URL moves, update each
corresponding line to use 301 instead of 302 (e.g., change "/playground
/playground/login/ 302" → use 301), leaving any entries that are truly temporary
as 302. Ensure you update every duplicate variant with and without trailing
slashes (both "/playground" and "/playground/") so all legacy forms reflect the
chosen permanent (301) status.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d32248ba-257e-431f-8c8c-f1c68059f4ae
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
pnpm-workspace.yamlwebsite/.gitignorewebsite/package.jsonwebsite/public/_headerswebsite/public/_redirectswebsite/wrangler.jsonc
Summary by cubic
Prepares the website for deployment on Cloudflare Workers Static Assets. Adds
wranglerconfig, Cloudflare build/deploy scripts, and tuned caching/redirects while keeping Vercel deploys available.New Features
website/wrangler.jsoncto serve./distwith trailing-slash and 404 handling.build.cloudflareanddeploy.cloudflarescripts; Vercel is nowdeploy.vercel._headersand_redirectsfor Workers static assets:/build/*,/assets/*,/fonts/*; shorter TTL for/og/*.q-data.jsoncaching with a single/*q-data.jsonrule./playground→/playground/login/,/{framework}/guides→.../introduction/, and/core/api→/solid/api/.wranglerto devDependencies; workspace enablesworkerdbuilds and excludesminiflare/wranglerfrom minimum release age..wranglerto.gitignore.Migration
pnpm -C website build.cloudflarethenpnpm -C website deploy.cloudflarepnpm -C website deploy, switch todeploy.vercel(Vercel) ordeploy.cloudflare(Cloudflare).Written for commit 96708c4. Summary will update on new commits.