mirror of
https://github.com/tiennm99/nntv.git
synced 2026-10-16 02:15:39 +00:00
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:
1 parent
932516ca3e
commit
656c9ea504
1 file changed
+3
@@ -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,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user