【问题标题】:Why am I seeing this image instead of my static firebase website?为什么我看到的是这张图片而不是我的静态 firebase 网站?
【发布时间】:2017-06-17 04:22:49
【问题描述】:

我希望看到我的 firebase 网站,但我看到的不是网络应用程序,而是这张图片。我想我遵循了Firebase Hosting 文档。

这是我的 firebase.json:

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

运行 firebase deploy 后,它说:

部署完成!

我错过了什么? :(

谢谢, 阿迪

【问题讨论】:

    标签: firebase hosting firebase-hosting


    【解决方案1】:

    这实际上是您的网站。当您运行Firebase init 时,它会使用您所看到的示例站点预先填充公用文件夹(您选择作为您的 dist 目录)。您必须将所有 HTML、CSS 和 JavaScript 放入 dist 目录并运行 firebase deploy --only hosting

    【讨论】:

    • 您的dist 目录的内容是什么?这就是将根据您的配置文件部署到 firebase 的内容
    猜你喜欢
    • 2013-04-04
    • 2012-11-25
    • 1970-01-01
    • 2021-11-06
    • 1970-01-01
    • 1970-01-01
    • 2013-07-28
    • 2021-05-21
    • 2013-09-09
    相关资源
    最近更新 更多