我正在尝试将我的应用程序部署到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
looks就像这样
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
]
}
}
我遇到了类似的问题。摆脱语法错误。我必须在每个文件中的每次导入后放置分号...但我还没有找到解决清单错误的正确方法。