From 656c9ea50422581d2cde411f5ade5080434a4853 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 20 Apr 2026 22:46:14 +0700 Subject: [PATCH] fix: use relative asset base for portable build output Built index.html now references ./assets/... instead of /assets/... so the dist folder works when opened directly (file://), served from a subpath (github pages project site, netlify deploy preview, etc.), or any non-root path. Previously the absolute-root paths produced a blank page with module load failures in those environments. Also ignore .claude/ local scratch dir. --- vite.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vite.config.js b/vite.config.js index 4520fce..a4988be 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,6 +3,9 @@ import { svelte } from '@sveltejs/vite-plugin-svelte'; export default defineConfig({ plugins: [svelte()], + // Relative asset paths — makes the built index.html work when opened + // directly (file://) or served from any subpath, not just the server root. + base: './', server: { port: 8080, },