Skip to content

fix(core): respect base path in static builds - #641

Merged
webfansplz merged 2 commits into
vitejs:mainfrom
0froq:fix/583-static-deploy-base
Nov 30, 2026
Merged

webfansplz merged 2 commits into
vitejs:mainfrom
0froq:fix/583-static-deploy-base

Conversation

@0froq

@0froq 0froq commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

This description was drafted by an agent from the diff and the commands it ran. froQ has reviewed it in detail.

Description

Pass Vite's base to buildHub as deployBase. @devframes/hub 1.3.6 rebases frame bases, dock URLs, and the absolute references inside copied SPAs under that prefix, so a static snapshot works when served below the domain root. This PR forwards the option and bumps the devframe catalog to 1.3.6.

Evidence

Ran the reproduction from #583 with the published @devframes/[email protected] and the deployBase line applied to its 0.8.2 core build:

vite build --base /ci-build-123456/

Serving custom-dir at that path:

200 /ci-build-123456/
200 /ci-build-123456/__devtools/
200 /ci-build-123456/__devtools-rolldown/
200 /ci-build-123456/__devframes_plugin_messages/
200 /ci-build-123456/__devframes_plugin_inspect/
200 /ci-build-123456/__devtools-assets/vite-plus.svg

A scan of every baked URL in the output's HTML, JS, CSS, and JSON found them all returning 200, with no root-absolute "/__..." left.

There is no new Vite-side test here. The rebasing lives in @devframes/hub and is covered by its build tests, and this PR forwards the option.

Linked Issues

Fixes #583

Additional context

The devframe side is devframes/devframe#494, released as 1.3.6.

@0froq
0froq marked this pull request as draft November 15, 2026 16:39
@0froq
0froq force-pushed the fix/583-static-deploy-base branch from 0ea4983 to 9dc4510 Compare November 18, 2026 13:55
@0froq
0froq marked this pull request as ready for review November 18, 2026 14:07
@0froq
0froq force-pushed the fix/583-static-deploy-base branch from 9dc4510 to 9cc33a3 Compare November 18, 2026 14:18
@pkg-pr-new

pkg-pr-new Bot commented Nov 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools@641

@vitejs/devtools-kit

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-kit@641

@vitejs/devtools-oxc

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-oxc@641

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-rolldown@641

@vitejs/devtools-vite

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-vite@641

@vitejs/devtools-vite-task

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-vite-task@641

@vitejs/devtools-vitest

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-vitest@641

commit: 9fe5e0e

@webfansplz webfansplz changed the title fix(core): serve static builds under a deploy path fix(core): respect base path in static builds Nov 30, 2026
@webfansplz
webfansplz merged commit ec5a9a3 into vitejs:main Nov 30, 2026
7 checks passed
@0froq
0froq deleted the fix/583-static-deploy-base branch November 30, 2026 12:26
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.

Static build: frame/panel URLs are still absolute when output is hosted at a subpath

2 participants