feat(docs): add wrangler - #2596
Conversation
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://docs-cf-add-wrangler-viteplus-dev.voidzero-docs.workers.dev (commit 1a2bd81)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
✅ Staging deployment successful! Preview: https://viteplus-staging.void.app/ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f6f6751cf
ℹ️ 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".
| "directory": "./.vitepress/dist", | ||
| "html_handling": "auto-trailing-slash", | ||
| "not_found_handling": "404-page" |
There was a problem hiding this comment.
Preserve the /vp-setup redirect in Cloudflare
When this configuration serves the docs through Cloudflare, only .vitepress/dist is uploaded, so Wrangler does not consume the repository-root netlify.toml, which currently defines the /vp-setup → https://setup.viteplus.dev 302 redirect. Consequently, that installer endpoint returns the generated 404 page after switching traffic to this deployment. Add the redirect to the assets directory via Cloudflare's _redirects mechanism or implement an equivalent Worker route.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🟡 Changes recommended
The committed Wrangler config hardcodes a real Cloudflare account_id, which makes deploys target a specific account and should be removed/parameterized before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds Cloudflare Wrangler support to the docs workspace so the VitePress site can be built and deployed via Wrangler.
Changes:
- Introduces a
wrangler.jsoncconfig targeting the built VitePress output in.vitepress/dist. - Adds
wrangler(and related lockfile/workspace adjustments) to the docs workspace. - Updates docs scripts and ignores Wrangler’s local state directory.
File summaries
| File | Description |
|---|---|
| docs/wrangler.jsonc | New Wrangler configuration for deploying the built docs site as static assets. |
| docs/pnpm-workspace.yaml | Allows workerd build scripts to satisfy pnpm’s reviewed-builds constraints for Wrangler dependencies. |
| docs/pnpm-lock.yaml | Lockfile updates for adding wrangler and its transitive dependencies. |
| docs/package.json | Adds Wrangler dependency and Cloudflare build/deploy scripts for docs. |
| docs/.gitignore | Ignores .wrangler state directory generated by Wrangler. |
Review details
Files not reviewed (1)
- docs/pnpm-lock.yaml: Generated file
- Files reviewed: 4/5 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "$schema": "node_modules/wrangler/config-schema.json", | ||
| "name": "viteplus-dev", | ||
| "compatibility_date": "2026-09-02", | ||
| "account_id": "f8b59a295069bd81a0f256b7012f2c53", |
| allowBuilds: | ||
| esbuild: false | ||
| vue-demi: false | ||
| workerd: true |
No description provided.