Skip to content

fix: use relative asset paths so --baseuri works with Vite build#1110

Merged
trim21 merged 3 commits into
jesec:masterfrom
trim21:fix/baseuri-static-assets
May 7, 2026
Merged

fix: use relative asset paths so --baseuri works with Vite build#1110
trim21 merged 3 commits into
jesec:masterfrom
trim21:fix/baseuri-static-assets

Conversation

@trim21

@trim21 trim21 commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Vite defaults base to /, which makes the built HTML reference assets with absolute paths like /assets/index-xxx.js. When --baseuri is set (e.g. /flood), the server registers routes under that prefix, but the browser still requests assets from the root — resulting in 404s.

Setting base: './' in the Vite config makes all asset references relative, so ./assets/xxx correctly resolves under any base URI.

Fixes #1109

Vite defaults `base` to `/`, which makes the built HTML reference assets
with absolute paths like `/assets/index-xxx.js`. When `--baseuri` is set
(e.g. `/flood`), the server registers routes under that prefix, but the
browser still requests assets from the root — resulting in 404s.

Setting `base: './'` makes all asset references relative, so
`./assets/xxx` correctly resolves under any base URI.

Fixes jesec#1109
@trim21 trim21 enabled auto-merge (squash) May 7, 2026 00:38
trim21 added 2 commits May 7, 2026 09:00
qBittorrent 5.2.0 was released on 2026-05-03 and breaks several
integration tests (add-urls, trackers, contents). Pin to the last
known-good release until the test suite is updated for 5.2.0.
@trim21 trim21 merged commit 6531501 into jesec:master May 7, 2026
23 checks passed
@trim21 trim21 mentioned this pull request May 8, 2026
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.

--baseuri broken on master

1 participant