Add Cloudflare as a deploy target to our website#1508
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 adds Cloudflare Workers static-assets deployment support for the valibot website. A new 🚥 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 |
commit: |
There was a problem hiding this comment.
Pull request overview
Adds Cloudflare Workers as an additional deployment target for the website/ package, including Wrangler configuration and Cloudflare-compatible redirect/header rules.
Changes:
- Add
wrangler.jsoncand newdeploy.cloudflare/build.cloudflarescripts to deploy the built static site via Cloudflare Workers. - Introduce Cloudflare
_redirectsand_headersfiles to replicate existing redirect/caching behavior. - Update pnpm workspace config + lockfile to allow/build Cloudflare tooling (
wrangler,workerd,miniflare).
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| website/wrangler.jsonc | Adds Wrangler (Workers static assets) configuration for deploying the built site. |
| website/public/_redirects | Adds Cloudflare redirect rules mirroring the existing guide redirects. |
| website/public/_headers | Adds Cloudflare header rules for caching and CORS on built assets. |
| website/package.json | Adds wrangler dev dependency and new Cloudflare build/deploy scripts. |
| website/.gitignore | Ignores Wrangler local state directory. |
| pnpm-workspace.yaml | Allows building workerd and excludes very recent Cloudflare-related releases from minimum release age. |
| pnpm-lock.yaml | Locks wrangler and its dependency tree. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 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
🤖 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/package.json`:
- Around line 21-22: The deploy.cloudflare script in package.json runs wrangler
deploy directly without ensuring the build step completes first, which can
deploy stale artifacts. Update the deploy.cloudflare script to chain the
build.cloudflare command before wrangler deploy by modifying it to run both
commands in sequence using &&, ensuring the dist directory is properly built
before deployment occurs.
🪄 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: eb18a521-9332-4b15-83ca-d02a3808e6cb
⛔ 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
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 301f8ec702
ℹ️ 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".
There was a problem hiding this comment.
2 issues found across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f141d3e51a
ℹ️ 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".
2ebf553 to
faefb57
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: faefb576d2
ℹ️ 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".
Summary by cubic
Adds Cloudflare Workers as a deploy target to serve the built
distfor valibot.dev with workers.dev preview URLs. Sets caching/redirect rules and stabilizes the build to avoid concurrent rebuilds that previously broke playground bundles.New Features
wrangler.jsoncto servedistwithhtml_handling: auto-trailing-slash, 404 handling,routesfor valibot.dev, and workers.dev previews._headersand_redirectsfor immutable asset caching, CORS on playground bundles (*-index.min.mjs), OG 1‑day cache, Qwik q-data short cache with SWR, and guide redirects.build.cloudflare(prebuildslibrary,packages/to-json-schema, andcodemod/zod-to-valibotbefore site build) anddeploy.cloudflare; Vercel deploy moved todeploy.vercel..wranglerignored in git.wrangler; enabledworkerdbuilds and allowed new Cloudflare packages viaminimumReleaseAgeExclude. Security: pinnedshell-quote@1to1.8.4via workspace overrides.Migration
pnpm --filter website build.cloudflarethenpnpm --filter website deploy.cloudflare. Vercel:pnpm --filter website deploy.vercel.Written for commit faefb57. Summary will update on new commits.