Reputation: 324
I'm using Expo Router. I've created some routes and used the Head
component to add static meta data tags. Running npx expo export -p web
creates the routes in my dist/
folder. When opening those html files I can see that they have the required meta tags present.
However when deploying said files to firebase hosting, I can see that the initial page load does not contain the header tags! I'm very confused as to why. Any help is apprechiated.
Upvotes: 0
Views: 88
Reputation: 324
I figured out that the issue was when I initally ran firebase init
I had said I wanted a singel page application, so there was a reroute in my firebase.json
file that redirected everything to index.html.
Removing that and adding "cleanUrls": true
to my firebase json config solved the issue!
my firebase.json hosting section now looks like this:
"hosting": {
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"cleanUrls": true
},
Upvotes: 0