【问题标题】:How to change Firebase homepage destination如何更改 Firebase 主页目标
【发布时间】:2019-04-30 08:46:56
【问题描述】:

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

即使是简单的配置文件,也会为所有路由调用入口函数,但不是 / :

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

有人遇到过这个问题吗?

注意:玩过之后它看起来像:只要 index.html 存在于 / 路径,它就一直使用它......但是在重命名它之后会发生不同的重写设置

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

【问题讨论】:

    标签: firebase firebase-hosting


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-25
      • 2020-08-03
      • 1970-01-01
      • 2015-04-21
      • 2018-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多