Right now project has pretty straightforward PWA support. PWA enables installation as Mobile/Desktop Application.
In order to support PWA approach the following utilities were used:
- Webpack Favicon Plugin - to prepare PWA
manifest.json
and Icons PWA setup; - Webpack Workbox Plugin - to generate PWA Service Worker for Offline mode support;
💡 Note: Using Workbox GenerateSW limits control of offline mode (e.g. caching strategy).
- Service Worker - created by Webpack Workbox Plugin it registered in Application entry file when PWA support enabled (see /src/client/index.ts).
To build Application with PWA support - use npm run build:client:prod:pwa
which injects WITH_PWA environment variable used to control it.