I am using ionic 2 CLI and I have generated a new project using their CLI.
Inside the WWW folder two files are generated which really confused me. Files are manifest.json for web app install and serviceworker.js.
From here I got a doubt, with the ionic 2 can we build both with same codebase. I am newbie to Ionic.
Can we use the WWW folder for webapp deploy?
Jeff Cressman
The short answer is yes, you can deploy your app as both a PWA and to devices with a some minor changes to the code. You need to uncomment the service worker lines in the index.html file and optionally update the manifest.json to use a logo, name, and colors of your choosing.
This is one of the Ionic teams PWA demos that shows off deploying the same app as PWA as well as to iOS and Android:
github.com/ionic-team/ionic-conference-app
pwa.ionic.io/ionic-conference-app/www
You can read more about Ionic PWA support here blog.ionicframework.com/announcing-pwa-support-in… and here ionicframework.com/docs/developer-resources/progr…
Here's one more tutorial for good measure joshmorony.com/launching-a-progressive-web-app-pw…