【发布时间】:2019-02-12 16:55:08
【问题描述】:
我正在尝试将我的应用部署到 Firebase。这是一个单页应用程序。我之前部署时取得了成功,在开发开始时查看 Redux 和 Router 是否正常工作(它们是)。但是现在在我部署的最后阶段,我得到了空白页面,我不知道为什么。我知道它与它有关,假设它是一个 javascript 文件,当它看到
它给了我错误
Uncaught SyntaxError: Unexpected token <
Uncaught SyntaxError: Unexpected token <
Manifest: Line: 1, column: 1, Unexpected token.
做firebase init的时候我选择了
What do you want to use as your public directory? build
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
? File build/index.html already exists. Overwrite? No
我的firebase.json看起来像这样
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
]
}
}
【问题讨论】:
-
你好 Zhast,我也面临类似的问题,你能写出它是如何解决你的问题的吗?
标签: reactjs firebase deployment