如何更改Firebase主页目标 [英] How to change Firebase homepage destination

查看:71
本文介绍了如何更改Firebase主页目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当涉及到主页时,它看起来并不像Firebase尊重firebase.json配置文件.我需要对所有路由都使用rendertron中间件功能.它可以成功地在子路线上运行,但不能在本地路线上运行

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"
      }
    ]
  }
}

有人遇到这个问题吗?

注意:之后,它看起来像:只要index.html存在于/path,它就一直使用....但是在重命名之后,会进行一些不同的重写设置

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

解决方案::如果有人遇到相同的问题-您需要将index.html文件重命名为app.html (不要忘记更改索引属性)值也包含在angular.json文件中).

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

推荐答案

解决方案:如果有人遇到相同的问题-您需要将index.html文件重命名为app.html之类的名称(不要忘记更改index属性)值也包含在angular.json文件中).

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

这篇关于如何更改Firebase主页目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆