Deployed firebase s.p.a website shows 404 before index upon refresh #34442
-
After I deploy my (single page application) website to firebase and refresh the page, it will load the 404 page before the index one. You can barely see it because the transition goes pretty fast, but when you spam refresh you can clearly see it. I tried to find anything related to this, but i couldn't. For now I can delete all the styling in 404 so it's a blank page to hide it. I am using the default firebase configuration and added a these rewrites. But this doesn't seem to work for a s.p.a.
This only happens in production, not in development. My only option now is to use another hosting, but I still hope there is something I can do to fix this. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
When refreshing, firebase is trying to search for the “/home” directory/file and can’t find it because it's a s.p.a website. As firebase is probably only good for static sites, i'll use another hosting. |
Beta Was this translation helpful? Give feedback.
-
Hey there, I had a similar problem. When I refresh the website on the home page ( I fixed the issue configuring the firebase.json file. Here are the settings that worked for me:
I hope it could help you, too. |
Beta Was this translation helpful? Give feedback.
When refreshing, firebase is trying to search for the “/home” directory/file and can’t find it because it's a s.p.a website. As firebase is probably only good for static sites, i'll use another hosting.