Search code examples
firebasefirebase-hosting

How to change Firebase homepage destination


It doesn't really looks like Firebase respect firebase.json config file when it comes to homepage.. I need to use a rendertron middleware function for all routes. It successfully runs for child routes, but never for the home route

Even the simple config file like, invokes entry function for all routes, but not / :

{
  "hosting": {
    "public": "dist",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
    "rewrites": [
      {
        "source": "**",
        "function": "entry"
      }
    ]
  }
}

Does anyone came across this problem?

Note: After playing around it looks like: as long as index.html is present for / path its always used.... but after renaming it something different rewrites settings take place

Solution: If anyone experienced the same problem - you need to rename you index.html file to something like app.html (don't forget to change index property value inside angular.json file as well).


Solution

  • Solution: If anyone experienced the same problem - you need to rename you index.html file to something like app.html (don't forget to change index property value inside angular.json file as well).