在 firebase 托管上部署我的 flutter web 应用程序后,路由似乎已停止工作。专门尝试导航到这样的页面:
https://example.com/blogpost/{blog post id} 将我带到 404 未找到页面。
我不得不添加这是 firebase.json 文件,因为我们之前的开发人员没有帮助我们如何部署网站:
{
"hosting": {
"public": "build/web",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}