Skip to content

docs(upgrading): record the vercel function rename to b4.func - #725

Merged
blove merged 2 commits into
mainfrom
docs/upgrading-vercel-function-name
Sep 18, 2026
Merged

blove merged 2 commits into
mainfrom
docs/upgrading-vercel-function-name

Conversation

@blove

@blove blove commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Why

#717 moved the vercel target's published function from functions/index.func/ to functions/b4.func/, and its route from /index to /b4, in every build rather than only when build.vercel.static was configured. It shipped a thorough changeset. But the Upgrading page carries entries at exactly this weight, and it had none, so the changeset was the only place a user learned their deploy script needs updating.

The gap was found by the #679 session. I verified the behaviour against the shipped resolver on main rather than the PR description, which matters here because the attribution and the conditionality both shifted between PRs during the day.

The part worth reviewing

The migration splits, and the split is easy to get wrong:

  • An app with no static assets can set build.vercel: { functionName: "index" } and keep its old published path indefinitely.
  • An app configuring build.vercel.static cannot. resolveVercelComposition rejects that combination, because a function named index would shadow the static root. For that app the path move is mandatory.

An entry that said "set functionName: "index" to keep the old name" without that caveat would hand the users most likely to be composing a tree an option that fails their build. The entry shows both, with the failing case marked as failing.

The name rule quoted in the entry is main's FUNCTION_NAME_PATTERN, one path segment of letters, digits, _ or -, and I confirmed b4 check reaches it through assertVercelBuildConfig into resolveVercelComposition.

Verification

  • apps/web SEO and sitemap tests: 67 passed.
  • scripts/check-docs.mjs: passes.
  • Manifest regenerated, freshness check passes. Note this PR predates #713, so regenerating by hand is still the rule here; once that lands it will not be.

Not in scope

The contradiction at deployment/vercel.mdx line 145 is #724, owned by the session that wrote the page. This PR does not touch it.

🤖 Generated with Claude Code

#717 moved the vercel target's published function from
functions/index.func to functions/b4.func and its route from /index to
/b4, in every build rather than only when static assets are configured.
Its changeset says so, but the Upgrading page carries entries at this
weight and had none, so the changeset was the only place a user learned
their deploy script needs updating.

The entry splits the migration, which is the part a reader gets burned
by: an app with no static assets can pin functionName: "index" and keep
the old path, but an app configuring build.vercel.static cannot, because
the build rejects that combination rather than publishing a tree whose
root is shadowed.

Gap found by the #679 session; behaviour verified against the shipped
resolver on main rather than the PR description.

Co-Authored-By: Claude Opus 5 <[email protected]>
@vercel

vercel Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
b4-run Ready Ready Preview Sep 18, 2026 1:11am UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

A reader who hits that build failure asks whether it is an oversight.
It is not: an explicit index shadows the static root exactly as the old
default did, so allowing it would reintroduce #687 in the configuration
where it matters most. Rationale from the #717 author.

Co-Authored-By: Claude Opus 5 <[email protected]>
@blove
blove enabled auto-merge (squash) September 18, 2026 01:16
@blove
blove merged commit ecef390 into main Sep 18, 2026
29 of 30 checks passed
@blove
blove deleted the docs/upgrading-vercel-function-name branch September 18, 2026 01:59

This branch was successfully deployed

1 active and 1 inactive deployments
vercel-preview — 2e614ccf Deployed Sep 18, 2026 by blove via vercel-native #2060
Preview — 2e614ccf Deployed Sep 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant