Firebase: obsolescence warning: Firebase hosting configuration should be moved under the "hosting" key

After updating my Firebase project, I received this warning when I deployed my project to a Firebase host.

Deprecation Warning: Firebase Hosting configuration should be moved under "hosting" key.

Does anyone have the same problem? How can i fix this?

+6
source share
1 answer

You just need to modify the firebase.json file, which I assume looks something like this:

 { "public": "dist", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "**", "destination": "/index.html" } ] } 

You need to move the specified keys (in this case, public , ignore and rewrites ) to the hosting key so that the fragment above looks below.

 { "hosting": { "public": "dist", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "**", "destination": "/index.html" } ] } } 

Check out this link for more information on Firebase Host Hosting Configuration .

+11
source

All Articles