When building our application for production using the vue-pwa template, it includes ServiceWorker. This is essentially a script that runs in the background and allows us to take advantage of offline-first approaches, push notifications, background sync, and more.
Our application will now also prompt our user to install the application on their home screen, as follows:
If we are disconnected from the internet, we'd also get an offline-first experience, as the application still continues to function. This is one of the major benefits we get when using the vue-pwa template, and if you'd like to read more about ServiceWorker and see how you can customize this to your needs, Google has a great onboarding guide at https://developers.google.com/web/fundamentals/primers/service-workers/.