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.
This commit is contained in:
tiennm99 committed 2026-04-20 22:46:14 +07:00
1 parent 932516ca3e
commit 656c9ea504
1 file changed
+3
+3
View File
@@ -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,
},