This is a sample PWA using Vue 3 and the Vue CLI PWA plugin and Workbox.
npm install
If you don't already have serve
installed globally, you will need it for serving the PWA in production mode so you can test installing the PWA from your machine.
npm install -g serve
Use this to debug the service worker. Requires installing serve
.
npm run pwa-serve
npm run dev
npm run build
npm run test:unit
npm run test:e2e
npm run lint
To test that the API is being cached:
- Run the application in pwa-serve
npm run pwa-serve
- In Chrome Dev Tools, go to Application tab >> Service Worker >> check mark the Offline.
- Pay attention to the dog picture on the Home page.
- Navigate to About Page
- Navigate back to the Home Page.
- Verify the picture of the dog is the same picture.
To test that the API call is not being cached:
- Run the application in pwa-serve
npm run pwa-serve
- In Chrome Dev Tools, go to Application tab >> Service Worker. Make sure Offline is not checked.
- Pay attention to the dog picture on the Home page.
- Navigate to About Page
- Navigate back to the Home Page.
- Verify the picture of the dog is a different picture.
TODO
TODO
TODO