I'm building a very simple one-page react application using typescript. I tried hosting it using Firebase Hosting. Surprisingly, only the domain [name].firebaseapp.com works but [name].web.app shows the "Site not found" default page:
I am using a basic firebase config (the default one you get using firebase init
):
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
I get the "Site not found" when I go on [name].web.app. I would have suspected something was wrong with the index.html
, the rewrites, the build folder, etc... but then why would I see the page functional on [name].firebaseapp.com and hosted nicely and it should be?
There is a few things I suspect:
- The domain name is not available from firebase itself (although why would firebase name the domain something that is invalid if that was the case when creating the project)
- The files are being pushed to the [name].firebaseapp.com domain only (in that case, how can you control that?)