Skip to content

[cf] Document that prebuilt deploys can omit --mode - #36092

Open
TheVoidJulius wants to merge 2 commits into
cloudflare:productionfrom
TheVoidJulius:cf-prebuilt-mode
Open

TheVoidJulius wants to merge 2 commits into
cloudflare:productionfrom
TheVoidJulius:cf-prebuilt-mode

Conversation

@TheVoidJulius

Copy link
Copy Markdown

Summary

Fixes #35430

The guide says to pass --mode production when deploying a prebuilt Vite build. The CLI also accepts the build without the flag, and only rejects a mode that does not match.

Tested with cf 1.0.0-rc.7, Wrangler 4.171.0, and @cloudflare/vite-plugin 2.0.0-rc.9 on Windows 11 and Node.js 26.13.0. Nothing was deployed. After cf build recorded production:

  • cf deploy --dry-run --prebuilt exits 0.
  • cf deploy --dry-run --prebuilt --mode production exits 0.
  • cf deploy --dry-run --prebuilt --mode staging exits 1 with the message now shown in Troubleshooting.

cf workers versions create --dry-run and cf workers check also accept --prebuilt without a mode. I did not test cf previews deploy or cf workers triggers deploy.

Documentation checklist

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

AI Review

✅ Reviewed a46c98a · 1 finding · incremental

👉 Fix in your agent 👈
Fix the following review findings in PR #36092 (https://github.com/cloudflare/cloudflare-docs/pull/36092).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification.
- If you disagree, explain why.
- If you need clarification before deciding, ask those questions.
- Then share your plan for which issues to tackle and in what order.

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit because the next review reads PR comments.

## Code Review
- C-016e49d9 | src/content/docs/cf/projects/index.mdx:294 | New mode-optional example contradicts earlier statement on the same page
  The new example shows a prebuilt deploy with no `--mode`, but a few paragraphs above (in the Modes section) the page still says: "Build Output records the mode it was built with. When you deploy an existing build, pass the same mode." Readers get opposite guidance in the same page.
  ```txt
  cf deploy --prebuilt
  ```

Code Review

Skipped: no new code changes since the last review.

  • src/content/docs/cf/projects/index.mdx:294 · New mode-optional example contradicts earlier statement on the same page

    The new example shows a prebuilt deploy with no --mode, but a few paragraphs above (in the Modes section) the page still says: "Build Output records the mode it was built with. When you deploy an existing build, pass the same mode." Readers get opposite guidance in the same page.

    cf deploy --prebuilt
Commands
  • /review Run a review now.
  • /full-review Review the entire PR diff.
  • /disable-auto-review Stop automatic reviews.
  • /rebase Rebase against production.

@cloudflare-docs-bot

Copy link
Copy Markdown
Contributor

Review coverage

🟡 2 ownership areas need approval.

Suggested reviewers: @danlapid @irvinebroque

Needs approval Eligible approvers Suggested
workers @GregBrimble, @irvinebroque, @MattieTK, @mikenomitch, @vy-ton, @WalshyDev, @cloudflare/deploy-config, @cloudflare/workers-runtime-1, @cloudflare/wrangler, @cloudflare/product-owners danlapid, irvinebroque
cf @cloudflare/product-owners @cloudflare/product-owners
CODEOWNERS only · not notified
CODEOWNERS mappings for displayed areas (2)
Pattern Owners
/src/content/partials/workers/ @GregBrimble, @irvinebroque, @MattieTK, @mikenomitch, @vy-ton, @WalshyDev, @cloudflare/deploy-config, @cloudflare/workers-runtime-1, @cloudflare/wrangler, @cloudflare/product-owners
* @cloudflare/product-owners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cf): document that prebuilt deploy can omit --mode

1 participant