【发布时间】:2021-05-31 02:01:01
【问题描述】:
我用npm run build && npm run export 构建了一个nextjs 应用程序,并使用firebase deploy 命令部署到了firebase。在此之前,我在我的项目文件夹中使用了firebase init,只使用了默认选项,例如。不是单页应用程序。
然而,当我在 firebase 提供的 url 中访问我的项目后,我看到主页是 index.html,但每当我使用任何其他 slug 时,它都会抛出 404。为什么会这样?我已经包含了我的 firebase.json 文件,以防万一。
firebase.json
"hosting": {
"public": "out",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
【问题讨论】: