Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion core/http/react-ui/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ export default defineConfig({
]
: []),
],
base: '/',
// Relative base so every generated URL (entry scripts in index.html, CSS
// `url()` font references, and lazily-imported route chunks) resolves against
// the file that references it rather than the origin root. When LocalAI is
// served under a reverse-proxy subpath (X-Forwarded-Prefix, e.g. `/llm/`),
// an absolute `/assets/...` bypasses the prefix and 404s — breaking fonts
// ("tofu" glyphs) and lazy-loaded chunks. index.html's now-relative refs
// resolve via the `<base href>` that serveIndex always injects (see
// core/http/app.go), so both proxied and root deployments load correctly.
base: './',
server: {
port: 3000,
proxy: {
Expand Down
Loading