Replies: 1 comment
-
Hi there, It seems like you're encountering an issue with Vue.js routing when deploying on Vercel. The problem you described, where only the home route ( To resolve this issue, you can create a {
"rewrites": [{ "source": "/:path*", "destination": "/index.html" }]
} This configuration ensures that all requests are redirected to the index.html file, allowing Vue Router to handle client-side routing properly. For more detailed information, you can refer to the Vue Router documentation on history mode and Vercel deployment here. You can see vercel documentation for vuejs SPA's routing here Note This example is valid for vuejs apps, If you are using a different framework, the procediment is same, because the error is same (Routing error). If the app is made in React you refer to this detailed solutions. Let me know if this solves your problem! |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
When deployed on vercel, only the home route(/) loads on browser refresh, but all other routes, on refresh displays and error of 404: NOT_FOUND
Code: NOT_FOUND
ID: cdg1::679rm-1715252919588-b1d53b1b0ef7
Reproduction
https://quick-filler.vercel.app/services
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions