Deploy your Ionic 4/5 as a Web app on Firebase



  • Hello guys, in this post i'll show you how to deploy your ionic 4/5 app as a web app on Firebase.

    In this tutorial i'm assuming you have installed firebase-tools and you have created firebase project on firebase console.

    Let's dive 🏊

    1. Open your terminal and cd to your root of ionic project

    2. Then run ionic build —prod —release

    3. If you want to run and see before deploying you can install http-server from npm and run,

      1. cd www/
      2. http-server .
    4. Then initilize firebase by running firebase init
      image-20200405003723256.png
      Choose Hosting: Configure and deploy Firebase Hosting sites option (press space bar to choose) and press Enter
      image-20200405003900555.png
      Now choose Use an existing project and select your project
      image-20200405004011793.png
      For this enter www as public directory
      image-20200405004050940.png

    5. For next question enter **y **and for final question enter N.

      Now firebase has initilized on our project directory, you will see two nes files as firebase.json & .firebaserc, it means firebase has initialised, let's move on

    6. Now run firebase deploy this command will deploy our app to firebase, after successfull deploy you will see like below.
      image-20200405004527355.png
      Visit your newly hosted web app by going to **Hosting URL


  • Linux Help

    this is ionic PWA ??