Repository navigation
docs(vercel): explain the streaming flag and the composed entry path - #716
Merged
Merged
Conversation
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]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
temporarily deployed
to
vercel-preview
September 17, 2026 23:00 — with
GitHub Actions
Inactive
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: trueis 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.functionshas 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 withoutbuild.vercel.static; a build with a frontend emitsb4.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.tsconfirms the composed tree and route order the page describes: user routes,{ handle: "filesystem" }, the runtime function on the scopedsrc, then the SPA fallback, withb4.funcalongsideapi.funcandstatic/.pnpm build,node scripts/check-docs.mjs,seo:lastmod:check, andpnpm lintall pass.Docs-only, no changeset. Not a release.
🤖 Generated with Claude Code