dashboard-v2 fix: absolute /clawstor/ base #96

Merged
osobh merged 1 commits from dashboard-v2-absolute-base into main 2026-07-14 23:33:28 +00:00
+7 -6
View File
@@ -6,12 +6,13 @@ import react from '@vitejs/plugin-react';
// During local dev the daemon proxies /api/v2/* on :7700 so
// `vite dev` on :5173 can hit it via server.proxy.
export default defineConfig({
// Relative asset URLs so the SPA works under any mount path.
// Local: served at :7700/v2/ → assets requested as ./assets/...
// Tailscale: /clawstor → assets requested as ./assets/...
// Vite emits `./assets/index-XXX.js` in index.html which the
// browser resolves relative to the current URL — works for both.
base: './',
// Absolute base tied to the deploy path. Prior try was `./`
// (fully relative) which broke when the user hit `/clawstor`
// without trailing slash — browser resolves `./assets/…`
// against `/clawstor` treated as a file, gives `/assets/…`,
// 404 from Tailscale. Absolute `/clawstor/` sidesteps the
// slash / no-slash ambiguity.
base: '/clawstor/',
plugins: [react()],
server: {
port: 5173,