我在跑firebase init
它正在创造firebase.json
. firebase.json
位于应用程序根目录中,指向我的公共目录app
。看这里:
firebase.json
{
"firebase": "harrison",
"public": "app",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
Here is where my firebase.json lives:
Here is my public directory, app
:
当我跑步时firebase deploy
从命令行来看,一切似乎都正确上传。然后我跑firebase open
或者等效地转到部署站点,当我的 index.html 明显位于指定目录中时,我收到 404 消息,表示未找到它。
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
我遇到了和你一样的问题,这是我的解决方案:
运行 firebase 初始化
选择主机选项
全部重写到索引:是
覆盖 dist/index :否
然后 firebase 部署
然后解决问题
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)