Skip to content

Commit a1963f2

Browse files
committed
fix: add Vite base option for correct asset paths on GitHub Pages
The baseURL option only affects routing, not asset paths. Adding the Vite base option ensures all assets (JS, CSS) are requested from the correct path (/gc-solid-ui/) when deployed to GitHub Pages. This fixes the blank page and 404 errors for JavaScript files.
1 parent 136ad69 commit a1963f2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

app.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default defineConfig(
2121
}
2222
},
2323
vite: {
24+
base: process.env.NODE_ENV === "production" ? "/gc-solid-ui/" : "/",
2425
plugins: [tailwindcss()],
2526
resolve: {
2627
conditions: ["solid", "browser", "development"]

0 commit comments

Comments
 (0)