I originally asked this question on Stackoverflow but I was advised by @mbleigh to open a Feature Request here.
I am using Firebase Hosting for many websites. Some websites have static files that I want to serve from Firebase Hosting static file serving, however, some others only have dynamic content for which I want to leverage Firebase's custom domain and caching.
It seems that the public attribute is required in firebase.json . This requires me to deploy a public folder with a dummy file in it.
It would be great to allow deploying to Firebase Hosting without any public directory,but with at least one function or run redirect.
The following gives me this error: Error: Must supply a public directory using "public" in each "hosting" config.
{
"hosting": [
{
"target": "index",
"public": "static",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
{
"target": "api",
"rewrites": [
{
"source": "**",
"run": {
"serviceId": "api",
"region": "us-central1"
}
}
]
}
]
}
I originally asked this question on Stackoverflow but I was advised by @mbleigh to open a Feature Request here.
I am using Firebase Hosting for many websites. Some websites have static files that I want to serve from Firebase Hosting static file serving, however, some others only have dynamic content for which I want to leverage Firebase's custom domain and caching.
It seems that the
publicattribute is required infirebase.json. This requires me to deploy a public folder with a dummy file in it.It would be great to allow deploying to Firebase Hosting without any
publicdirectory,but with at least onefunctionorrunredirect.The following gives me this error:
Error: Must supply a public directory using "public" in each "hosting" config.