From 52ec2900550a0470352af5d8dd3638894e8ccc00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mats=20T=C3=B6rnberg?= Date: Sun, 27 Sep 2026 22:51:04 +0200 Subject: [PATCH] Fix console assets on nested routes The relative Vite base made BrowserRouter pages request JavaScript and CSS under /auth/assets. The SPA fallback returned index.html for those paths, so the browser never mounted React and the sign-in page appeared blank. Emit root-relative asset URLs so every client-side route loads the embedded console bundle. --- internal/web/dist/index.html | 6 +++--- web/vite.config.ts | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/internal/web/dist/index.html b/internal/web/dist/index.html index f61ba25..9b21560 100644 --- a/internal/web/dist/index.html +++ b/internal/web/dist/index.html @@ -2,11 +2,11 @@ - + web - - + +
diff --git a/web/vite.config.ts b/web/vite.config.ts index 44004e8..2ceb29f 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -6,7 +6,11 @@ import { defineConfig } from 'vite' // the app always talks to a relative `/api` base. During development Vite // proxies that prefix to a locally running fancy-dns. export default defineConfig({ - base: './', + // BrowserRouter routes such as /auth/login are served by the SPA fallback. + // A relative base makes their asset URLs resolve under /auth/assets, which + // the fallback answers with index.html and leaves the page blank. Rooted + // URLs keep assets and API calls on the application origin at every route. + base: '/', plugins: [react(), tailwindcss()], server: { proxy: {