How to change Firebase homepage destination

邮差的信 提交于 2019-12-08 03:29:59

问题


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).


回答1:


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).



来源:https://stackoverflow.com/questions/53519531/how-to-change-firebase-homepage-destination

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!