Deploy project to Firebase Hosting.

Deploy project to Firebase Hosting.

Release your Project with Firebase Hosting. To improve performance Create-Production-Build (If you are building Angular/PWA/Ionic App)

Before start..

We need to create and setup a Firebase project.
Click here👆 for Steps to setup Firebase (Create New Database in Firebase Firestore by web.)

Okay, I assume you have followed each step from above link↑ to setup a Firebase Project.

Deploying to Firebase becomes easy after correctly setting up a Firebase project.

We should always prepare production build before deploying to Firebase.
Let's prepare production build to improve performance.
To do so follow the instruction👇👇

If you are building Angular App, simply run in your command-prompt/terminal:

ng build --prod
You may need to put 'sudo' at the beginning of this command to execute it as administrator. Or if you are a Windows user simply open up your command-prompt as administrator.

If you are building Ionic App, simply run in your command-prompt/terminal:

ionic build --prod
You may need to put 'sudo' at the beginning of this command to execute it as administrator. Or if you are a Windows user simply open up your command-prompt as administrator.
What does it do, exactly? --prod flag minimizes and optimizes your entire project to a single file depending on type. It also ignores plugins/imports which you have included but haven't used.

Great job 👏👏
We are now ready to Deploy our project to Firebase 🚀

Simply deploy the app by running:

firebase deploy
You may need to put 'sudo' at the beginning of this command to execute it as administrator. Or if you are a Windows user simply open up your command-prompt as administrator.

Done! 🤩 It’s that simple to deploy project to Firebase Hosting.

See you later👋👋

Feel free to comment down in the comment box… If I missed anything or anything is incorrect or anything does not works for you :)
Stay connected for more articles.