feat(hub): let buildHub bake statics/frames outside the hub base - #354
feat(hub): let buildHub bake statics/frames outside the hub base#354antfubot wants to merge 1 commit into
Conversation
Add a `deployBase` option to `buildHub` so a context whose devframe SPAs and static assets are served as siblings of the hub base (not children of it) still bakes. `outDir` maps to `deployBase`; the hub's own artifacts write under `base` within it, and every mount base resolves against the deploy root by its path below it. Default `deployBase` stays `base`, the existing single-subtree layout. Closes #353
◈ PR Lens
Architecture 2 components touched across 3 lanes. Data flow
Drill down
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Follow-up to #347 / #349. Closes #353.
What
buildHubbaked the whole hub as one subtree under a singlebase: every mount base had to start with the hubbaseorresolveOutPaththrewDF8006. That blocked deploy shapes where the hub answers under one base (/__devtools/) while its devframe SPAs and vendored assets serve as siblings at their own top-level bases — the layout Vite DevTools needs to retire its hand-rolledbuild-static.ts.This adds a
deployBaseoption (option 1 from the issue).outDirmaps todeployBase(the deploy root); the hub's own artifacts write underbasewithin it, and every mount base resolves against the deploy root by its path below it.resolveOutPathnow only requires a mount base to live within the deploy root, so siblings of the hub base bake without error.deployBasedefaults tobase, preserving the existing single-subtree layout exactly — no behavior change for current callers.Notes
DF8007guards a hubbaseset outside itsdeployBase(its artifacts would have no home underoutDir).DF8006's wording now frames the boundary as the deploy root.buildHuboptions table gainsdeployBase; newDF8007error page;DF8006page updated.This PR was created with the help of an agent.