https://firebase.google.com/codelabs/firebase-web#0步骤5.运行命令firebase serve --only hosting在'http://localhost:5000‘处启动托管,并在代码实验室中显示“无法获取/”而不是友好的聊天模板。
发布于 2022-10-13 20:58:12
我只是遇到了同样的问题。在firebase.json中,公共路径需要为"./ public /index.html“。
看起来应该是:
{
"hosting": {
"public": "./public/index.html",
"headers": [{
"source" : "**/*.@(js|html)",
"headers" : [ {
"key" : "Cache-Control",
"value" : "max-age=0"
} ]
}]
}
}
https://stackoverflow.com/questions/74009623
复制相似问题