Repository navigation
Conversation
buildHub bakes root-absolute URLs for frame bases, dock entries, page scripts, and per-SPA asset references. A deploy base prefixes them so the same output serves under a subpath, while the on-disk deploy-root layout stays unchanged.
|
@0froq is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
|
👁️🗨️ Review this pull request with grouped, summarized diffs at: raw result💭 analyzed by {
"headSha": "6daee1acdd88f486e84b801512a8186021ed4e9c",
"result": {
"overallSummary": "buildHub gains a deployBase option so static builds can be served from a URL prefix other than the domain root: every root-absolute URL it bakes (frame bases, dock metadata, the RPC dump, static config, and copied SPA assets) is rewritten under that prefix, with a new DF8007 diagnostic guarding against an inconsistent base.",
"groups": [
{
"key": "deploy-base-core",
"label": "Deploy base rebasing",
"summary": "Adds a deployBase option to buildHub that rebases every root-absolute URL the build emits (frame bases, dock urls/icons, baked RPC dump page-script imports, ctx.staticConfig entries, and text assets copied from static mounts) under a served deploy prefix, and rejects a base outside deployBase with a new DF8007 diagnostic.",
"category": "core",
"filePaths": [
"packages/hub/src/node/build.ts",
"packages/hub/src/node/diagnostics.ts"
],
"critical": true,
"lineNotes": [
{
"path": "packages/hub/src/node/build.ts",
"side": "additions",
"line": 171,
"text": "String replaceAll with a manual already-prefixed check implements the text rewrite; worth double-checking for false-positive matches inside larger tokens.",
"critical": true
}
]
},
{
"key": "tests",
"label": "Tests",
"summary": "Adds coverage for the DF8007 rejection and for the full deploy-root layout being rebased under deployBase, plus the updated public-API type snapshot reflecting the new option.",
"category": "tests",
"filePaths": [
"packages/hub/src/node/__tests__/build.test.ts",
"tests/__snapshots__/tsnapi/@devframes/hub/build.snapshot.d.ts"
]
},
{
"key": "docs",
"label": "Documentation",
"summary": "Documents the new DF8007 error and the deployBase build option.",
"category": "docs",
"filePaths": [
"docs/content/6.errors/DF8007.md",
"docs/content/8.references/6.hub-api.md"
]
}
],
"schemaVersion": 1,
"source": "llm",
"generatedAt": "2026-11-15T16:19:20.046Z",
"model": "vercel-ai-gateway/anthropic/claude-sonnet-5",
"locale": "en"
}
} |
Author
|
👁️🗨️ Review this pull request with grouped, summarized diffs at: raw result💭 analyzed by {
"headSha": "6daee1acdd88f486e84b801512a8186021ed4e9c",
"result": {
"overallSummary": "`buildHub` gains a `deployBase` option: the deploy root keeps its on-disk layout from #355, but every root-absolute URL the build emits (frame bases, dock urls/icons, `ctx.staticConfig`, page-script imports) is rebased under the served prefix so the output works below the domain root. This unblocks the Vite DevTools downstream case (vitejs/devtools#583), which serves prebuilt Nuxt SPAs from a CI build path. A `base` outside `deployBase` is rejected with the new `DF8007`.",
"groups": [
{
"key": "deploy-base-rebasing",
"label": "Deploy base rebasing",
"summary": "Implements the option itself in `buildHub`: resolve the deploy prefix, strip it when mapping a served URL back to its on-disk location, and rebase the URLs the build bakes (index/frame metas, RPC dump payloads, client-imports module, copied SPA text assets). Adds `DF8007` for a hub base that is not under the deploy base.",
"category": "core",
"filePaths": [
"packages/hub/src/node/build.ts",
"packages/hub/src/node/diagnostics.ts"
],
"critical": true,
"lineNotes": [
{
"path": "packages/hub/src/node/build.ts",
"side": "additions",
"line": 168,
"text": "The rewrite table is built only from frame bases and static-dir base urls. A dock url/icon pointing at a path that is not a registered mount keeps its root-absolute form after rebasing."
},
{
"path": "packages/hub/src/node/build.ts",
"side": "additions",
"line": 249,
"text": "`alreadyPrefixed` looks back `prefixedBefore.length` chars in the whole text, so an occurrence already preceded by the deploy prefix is skipped (idempotency). Any unrelated text that happens to end with the prefix at that offset would also be left unrebased."
},
{
"path": "packages/hub/src/node/build.ts",
"side": "additions",
"line": 278,
"text": "Non-plain objects (Date, Map, class instances) are returned untouched, so a URL stored inside one is not rebased."
},
{
"path": "packages/hub/src/node/build.ts",
"side": "additions",
"line": 296,
"text": "Only `.css/.html/.js/.json/.mjs/.svg` are rewritten. Root-absolute references in any other copied file (e.g. `.webmanifest`, `.txt`, `.map`, extensionless) stay un-prefixed."
}
]
},
{
"key": "tests",
"label": "Tests and API snapshot",
"summary": "Covers both new paths: the `DF8007` rejection and a full build that installs a frame plus a static mount with an iframe dock under a CI prefix, then asserts the on-disk layout is unchanged while index, frame meta, dock snapshot and rewritten SPA files carry the served URLs. The `.d.ts` snapshot records the new public option.",
"category": "tests",
"filePaths": [
"packages/hub/src/node/__tests__/build.test.ts",
"tests/__snapshots__/tsnapi/@devframes/hub/build.snapshot.d.ts"
],
"fileNotes": [
{
"path": "tests/__snapshots__/tsnapi/@devframes/hub/build.snapshot.d.ts",
"text": "Generated by the tsnapi snapshot task; regenerate it rather than editing by hand."
}
]
},
{
"key": "docs",
"label": "Docs",
"summary": "Documents the new option in the `buildHub()` reference and adds the `DF8007` error page with the expected good/bad examples.",
"category": "docs",
"filePaths": [
"docs/content/6.errors/DF8007.md",
"docs/content/8.references/6.hub-api.md"
]
}
],
"schemaVersion": 1,
"source": "llm",
"generatedAt": "2026-11-15T16:20:14.900Z",
"model": "openai-compatible/opencode-go/deepseek-v4.1-flash",
"locale": "en"
}
} |
This was referenced Nov 15, 2026
This branch has not been 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.
Fixes #493
Description
buildHubnow takesdeployBase, the URL prefix the deploy root is served under. Every root-absolute URL the build emits is rebased under it, covering frame bases in__index.json, dock urls and icons plus page-script imports in the baked RPC dump,ctx.staticConfigURLs in the connection metas, and absolute references inside each copied SPA's text assets. AbaseoutsidedeployBasethrowsDF8007.The output keeps the deploy-root layout from #355, with the prefix applied to URLs.
Test
rebases the deploy-root layout under deployBaseinstalls a frame at/__alpha/and a static mount with an iframe dock at/__panel/, builds withbase: '/ci-build-123456/__devtools/'anddeployBase: '/ci-build-123456/', then checks the index, the per-frame meta, the dock snapshot, and the rewritten SPA files.buildStaticDevTools, rebuilt withvite build --base /ci-build-123456/, and servedcustom-dirat that path. The viewer, the rolldown panel, the messages and inspect panels, the_nuxtchunks, the assets, and the renderer all return 200. A scan of every baked absolute URL (26 unique) returned 200, and no root-absolute"/__..."reference remained.Context
Downstream report: vitejs/devtools#583. Closing it needs a Vite-side follow-up that passes
deployBasethroughbuildStaticDevTools, plus a hub release.The Vite integrations ship prebuilt Nuxt SPAs with
/__devtools-rolldown/...baked into their HTML. The copy step rewrites their text assets to the served prefix.