I work on Windows Pro 10 and use Workbox 6.x. As a test, in Chrome:
- I load my site
- Create a local app on the desktop
- Start the app
- Press F12 for DevTools
- Check Offline
- Change one of the file and rebuild the site
- Publish the site
- Check off Offline
What I would like is the updated service worker get activated right away, but DevTools says it is waiting.
Documentation says that by default this will be added to the service worker:
self.addEventListener('message', event => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
I check and indeed the code is added,
Why then isn't skipWaiting doing the job ?
Thanks,
Gilles Plante