This repository was archived by the owner on Dec 20, 2024. It is now read-only.
Blank page when deploying in Vercel #5614
Replies: 1 comment
|
Hi @oscarjpicazo ! I had this same issue a while ago. React is a single page application (someone can correct me if that isn't necessarily the case but is something I found in a stack overflow answer) and Vercel doesn't recognize routes set with react router dom by default. In your vercel.json (if you have one already, if not, create one in your root directory), add the following method: "rewrites": [
{ "source": "/(.*)", "destination": "/index.html" }
]Hope this helps! If it doesn't, I would want to see that error message your getting on your console. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Hi everyone!
I am trying to deploy an application in Vercel, which works correctly locally, and when it is deployed, it only shows a white tab, and an error in the console that does not appear locally.
What could I do so that instead of that white tab appearing, the application appears as it appears locally?
Example
No response
Steps to Reproduce
The deployment url:
https://feynman-tiktok.vercel.app/
I share my package.json:
All reactions