Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

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

    Web Development
    pwa ionic firebase hosting web
    2
    2
    295
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dev_lak
      dev_lak last edited by

      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 :swimmer:

      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

      1 Reply Last reply Reply Quote 2
      • root
        root Linux Help last edited by root

        this is ionic PWA ??

        1 Reply Last reply Reply Quote 2
        • 1 / 1
        • First post
          Last post

        1
        Online

        3.7k
        Users

        1.3k
        Topics

        5.3k
        Posts

        • Privacy
        • Terms & Conditions
        • Donate

        © Copyrights and All right reserved Lanka Developers Community

        Powered by Axis Technologies (PVT) Ltd

        Made with in Sri Lanka

        | |