【发布时间】:2020-09-09 03:53:36
【问题描述】:
我构建了一个可以在本地运行的 ReactJS 应用,我按照 Firebase 网站上的说明进行操作
https://medium.com/@devesu/host-a-react-based-website-free-of-cost-with-firebase-hosting-and-connect-with-your-own-domain-53146731807f
一切都按计划进行,但是当我点击提供的链接时没有错误
https://hydrometric-54ec0.web.app
或
https://hydrometric-54ec0.firebaseapp.com/
我得到一个默认的 Firebase 页面而不是我的应用程序,我认为我的 firebase.json 缺少一些东西,它在下面
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
【问题讨论】:
-
您部署的构建目录中到底有什么?
-
嘿,Doug,我有我的构建环境,但是我的 index html 被默认的 firebase 覆盖了……现在一切都好
标签: reactjs firebase firebase-hosting