From c17a8152639d4a4e291b80a38831d35e43e583fe Mon Sep 17 00:00:00 2001 From: Michel <74599230+michiosw@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:44:39 +0200 Subject: [PATCH] fix: use absolute vite base so SPA deep links don't white-screen (#336) With base '' the built index.html references assets relatively (./assets/*). On deep links like /listings/listing/:id the browser resolves those below the route path, the SPA fallback answers with index.html and the page dies trying to execute HTML as a JS module. Notification emails link directly to listing details, so every 'Open in fredy' link landed on a white screen. --- vite.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index d44d0c1..f6d72a6 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,7 +7,10 @@ import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; // https://vitejs.dev/config/ export default defineConfig({ - base: '', + // Must be absolute: with a relative base, asset URLs in index.html break on + // deep links like /listings/listing/:id (the SPA fallback serves index.html, + // but ./assets/* then resolves below the route path and loads HTML as JS). + base: '/', build: { chunkSizeWarningLimit: 9999999, outDir: './ui/public',