Skip to content

docs(vercel): explain the streaming flag and the composed entry path - #716

Merged
blove merged 1 commit into
mainfrom
docs/vercel-compose-followup
Sep 17, 2026
Merged

blove merged 1 commit into
mainfrom
docs/vercel-compose-followup

Conversation

@blove

@blove blove commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #700, after auditing the Vercel guide against #696's source and tests rather than its changeset.

#696 landed 24 minutes after #700 and rewrote the composing-a-frontend section itself, so the rewrite I owed is already done and this is not it. These are two gaps that survived, both of which a reader hits.

Streaming names its mechanism

The page said streaming "needs no extra configuration", which is true of the config and hides the mechanism. The runtime function's supportsResponseStreaming: true is what stops Vercel's Node launcher buffering the whole body, and the symptom when it is missing is specific and searchable: a deployed UI shows nothing until the run finishes, then everything at once. That is exactly the bug #696 fixed, so the page now names it.

It also notes the asymmetry: the build fixes this for the runtime function, but a function declared under build.vercel.functions has to ask for the flag itself.

The local-run path is the bare build's

The snippet hardcodes functions/index.func/index.mjs. That is correct only without build.vercel.static; a build with a frontend emits b4.func, so a reader in exactly the situation the composition section just described copies a path that does not exist. The emitted-artifacts table already warns that the paths move, but it is far enough from the snippet not to help there.

Verification

  • packages/cli/test/vercel-target.test.ts confirms the composed tree and route order the page describes: user routes, { handle: "filesystem" }, the runtime function on the scoped src, then the SPA fallback, with b4.func alongside api.func and static/.
  • pnpm build, node scripts/check-docs.mjs, seo:lastmod:check, and pnpm lint all pass.
  • Web docs and SEO suites: 496 passed, 1 skipped.

Docs-only, no changeset. Not a release.

🤖 Generated with Claude Code

Two gaps a reader hits, found auditing the page against #696's source
and tests rather than against its changeset.

- Streaming said only that it "needs no extra configuration", which is
  true of the config but hides the mechanism. The runtime function's
  `supportsResponseStreaming: true` is what stops Vercel's Node launcher
  buffering the whole body, and the symptom when it is absent is
  specific and searchable: a deployed UI shows nothing until the run
  finishes, then everything at once. That is the bug #696 fixed, so the
  page now names it, and notes that a function declared under
  `build.vercel.functions` has to ask for the flag itself.
- The local-run snippet hardcodes `functions/index.func/index.mjs`,
  which is correct only for a bare build. A build configuring
  `build.vercel.static` emits `b4.func`, so a reader with a frontend
  copies a path that does not exist. The emitted-artifacts table already
  warned that paths move; the snippet is far enough away to need it too.

Verified against packages/cli/test/vercel-target.test.ts, whose composed
tree and route order match what the page describes.

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

vercel Bot commented Sep 17, 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 17, 2026 11:01pm 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.

@blove
blove merged commit e9749e0 into main Sep 17, 2026
30 of 31 checks passed
@blove
blove deleted the docs/vercel-compose-followup branch September 17, 2026 23:16
blove added a commit that referenced this pull request Sep 17, 2026
#716 landed a paragraph telling readers to switch to b4.func when static is
configured. With the name unconditional that reads circularly against the
snippet above it, which already uses b4.func.

Co-Authored-By: Claude Opus 5 <[email protected]>
blove added a commit that referenced this pull request Sep 17, 2026
…717)

* feat(cli)!: name the Vercel runtime function b4.func in every build

The runtime function was named index.func unless build.vercel.static was
configured. The Build Output API also serves a function named index at /,
where it shadows a static index.html, so the conditional default left the
hazard latent: an app that added a frontend later had to rename its function
to get one, and anything assembling the published tree by hand had to know
which of the two names a given config produced.

The hazard is a property of the name, not of what a particular build emits,
so the name is now off the root always. functions/b4.func/ replaces
functions/index.func/ and config.json routes to /b4.

BREAKING CHANGE: the published output path changes for every app using the
vercel target. Anything reading .vercel/output/functions/index.func by path
follows the new name; build.vercel.functionName: "index" restores the old
layout for a build with no static assets. Rejecting "index" beside static
stays, since an explicit choice can still shadow the static root.

Closes #687

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

* docs(vercel): correct the local-entry note for the unconditional name

#716 landed a paragraph telling readers to switch to b4.func when static is
configured. With the name unconditional that reads circularly against the
snippet above it, which already uses b4.func.

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

---------

Co-authored-by: Claude Opus 5 <[email protected]>

This branch was successfully deployed

1 active and 1 inactive deployments
Preview — dc3db3f8 Deployed Sep 17, 2026 by vercel[bot]
vercel-preview — dc3db3f8 Deployed Sep 17, 2026 by blove via vercel-native #2031
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