【问题标题】:How do I get the Ember index.html to appear in dist directory instead of the firebase welcome page?如何让 Ember index.html 出现在 dist 目录而不是 firebase 欢迎页面中?
【发布时间】:2016-07-06 17:17:43
【问题描述】:

第一次这样做,所以我不知道该怎么做。

我初始化了firebase,将dist设置为公用文件夹,运行ember build -prod,然后运行firebase deploy

我看到欢迎我使用 firebase 托管的页面,但我想知道如何从我的 Ember 应用程序中获取 index.html,而不是 firebase 添加的 index.html。

这是我的 firebase.json 文件:

{
  "database": {
    "rules": "database.rules.json"
  },
  "hosting": {
    "public": "dist",
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

/dist 中的 index.html 是 Firebase 托管,/app 中的 index.html 是 Ember 应用程序。

如何让我的应用出现?

谢谢

【问题讨论】:

  • 你试过把它改成"public": "app"吗?
  • 刚刚。它仍然显示 firebase 欢迎页面。我可以导航到我的应用程序中的其他页面,但它只显示一些车把代码。此外,我认为 ember 构建到 dist

标签: ember.js firebase ember-cli


【解决方案1】:

Firebase CLI 将从firebase.json 部署在您的hosting.public 目录中指定的任何文件。在这种情况下,您可以运行 cat dist/index.html,您可能会看到 Firebase 托管默认页面的内容。

听起来您需要调查您的 Ember 构建过程并确定输出文件的确切位置。您还可以在本地使用 firebase serve 来预览将要部署的内容,而无需实际进行部署。

【讨论】:

    猜你喜欢
    • 2019-12-09
    • 2011-12-05
    • 2011-06-16
    • 2018-01-24
    • 1970-01-01
    • 2012-03-14
    • 2020-07-09
    • 2020-07-23
    • 1970-01-01
    相关资源
    最近更新 更多