已部署Firebase react.js应用-空白页

问题描述 投票:1回答:2

我是第一次使用Firebase,我部署了一个我知道可以正常工作并托管在github页面上的React应用。我按照Firebase文档提供的说明进行操作,并将该应用程序部署到他们的网站上。在加载网站时,我看到一个空白页。

链接:https://monsterpwa.web.app/

firebase.json文件:

{
  "hosting": {
    "public": "build",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

此处的先前帖子都是关于要更改的公共部分的内容。除此之外,我找不到其他人遇到类似问题。

控制台记录并出错,第一行第1列中有意外的标记'

清单文件:

{
  "short_name": "Monster App",
  "name": "Monster App D&D Spells and Items",
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    },
    {
      "src": "/public/media/800x800.png",
      "type": "image/png",
      "sizes": "800x800"
  }
  ],
  "start_url": "./index.html",
  "display": "standalone",
  "background_color": "#2d4059;",
  "theme_color": "#2d4059",
  "orientation": "portrait-primary"
}

亲切的问候,

我是第一次使用Firebase,我部署了一个我知道可以正常工作并托管在github页面上的React应用。我按照Firebase文档提供的说明进行操作,并将该应用程序部署到...

firebase firebase-hosting
2个回答
0
投票

如果检查浏览器的JavaScript控制台,则表明加载CSS存在问题。


0
投票

问题是,您已配置您的应用程序以在/MonsterPWA目录中查找资产,但该资产似乎不存在。

© www.soinside.com 2019 - 2024. All rights reserved.