问题
Deploying an application to Firebase hosting, I get the following error:
HTTP Error: 400, hosting.rewrites[0] is not exactly one from [subschema 0],[subschema 1]
This occurs with a simple configuration like:
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "/*/*",
"destination": "index.html"
}
]
}
}
This configuration does work when serving locally.
回答1:
Apparently, the error indicates that I should put a '/' in front of 'index.html'. Then it works for local and remote deploy.
来源:https://stackoverflow.com/questions/45760199/when-deploying-with-firebase-hosting-i-get-hosting-rewrites0-is-not-exactly-o