In my Angular 5 application I am using an Express app in combination with Firebase Cloud functions to render dynamic HTML markup for improved SEO purposes. Specifically for search crawler bots.
This works for all my routes except at root level (https://exampleapp.firebaseapp.com/) which serves the normal index.html instead of the result of my firebase function.
My firebase.json file looks like this:
{
"hosting": {
"public": "dist",
"rewrites": [
{
"source": "**",
"function": "app"
}
]
}
}
So all requests should be served by my app function. But why is this not the case for my root domain? Is there an extra step to ensure that the root is also included in this use case?
Edit:
And just to clarify I need the index.html file available in my dist folder to serve my users but I'm serving all crawlers with my express app which currently is working on all routes except the root domain.