fix: enable GitHub Pages SPA routing by copying index.html to 404.html

GitHub Pages will serve 404.html when a route is not found, allowing
the React app to load and handle client-side routing for SPA navigation.
This commit is contained in:
weishu
2026-01-13 21:52:57 +08:00
parent e8137cbeb2
commit 716a42e5e0
+1 -1
View File
@@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "vite build && cp dist/index.html dist/404.html",
"typecheck": "tsc --noEmit",
"preview": "vite preview"
},