fix: add SPA rewrite rule for Vercel deployment
Without this, Vercel serves a 404 for any client-side route accessed directly (e.g. /admin/login, /shop) since it has no server-side route matching those paths — only index.html exists as a static file. React Router then never gets a chance to handle the path client-side. Claude-Session: https://claude.ai/code/session_01NhxA4npAXAxmCDEJt6kxSH
This commit is contained in:
5
vercel.json
Normal file
5
vercel.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"rewrites": [
|
||||||
|
{ "source": "/(.*)", "destination": "/index.html" }
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user