I deploy a react, typescript project using Vite. Veployed app working fine but while refreshing a page getting a 404 error.
404: NOT_FOUND
Code: NOT_FOUND
Add this to your vercel.json
file. Then push
or deploy
to vercel again.
{
"routes": [
{ "handle": "filesystem" },
{ "src": "/.*", "dest": "/index.html" }
]
}