firebase.json:
{
"hosting": {
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [ {
"source" : "**/*.@(otf|woff|woff2|eot)",
"headers" : [ {
"key" : "Access-Control-Allow-Origin",
"value" : "*"
} ]
}, {
"source" : "**/*.@(css|js|png)",
"headers" : [ {
"key" : "Cache-Control",
"value" : "max-age=14400"
} ]
} ]
}
}
我无法使用firebase deploy
命令在Firebase托管中部署静态网站。我得到的错误是:
Error: There was an error loading firebase.json:
Unexpected token ' ' at 3:1
"rewrites": [
^
究竟是什么错误?
答案 0 :(得分:0)
我尝试删除所有空格,标签和&然后尝试firebase deploy
,这次它已成功部署。
仍然不知道是什么导致了这个错误。无论如何,感谢SO社区。 p>