I have a project with multiple firebase hosting projects set up (for staging and production), and when I add rewrites per the Firebase docs here the rewrite for function /bigben does not work at https://customdomain.com/bigben (both deployed to production and in the emulators)
firebase.json
{
"hosting": [
{
"target": "production",
"public": "build",
"rewrites": [
{
"source": "/bigben",
"function": "bigben"
},
{
"source": "**",
"destination": "/index.html"
},
{
"source": "!/@(js|css|svg|jpg|png|gif|ico|json|html)/**",
"destination": "/index.html"
}
]
// ...
},
{
"target": "staging",
"public": "build",
"rewrites": [
{
"source": "/bigben",
"function": "bigben"
},
{
"source": "**",
"destination": "/index.html"
},
{
"source": "!/@(js|css|svg|jpg|png|gif|ico|json|html)/**",
"destination": "/index.html"
}
]
// ...
}
]
}
How can I set /bigben to use this custom domain (that is already configured in Firebase for hosting/the frontend create-react-app? I've seen removing index.html from the build folder, but isn't that needed for CRA?