skipWaiting in a Service Worker with react-scripts v3

06/12/20191 Min Read — In Development

A recent update to workbox broke the skip waiting functionality in a service worker generated by CRAv3.
I'm using cra-append-sw to patch the service worker generated by react-scripts. All that I needed to do was change workbox.skipWaiting(); to workbox.core.skipWaiting(); to get it working again.
The new workbox-window package was helpful in testing this behavior, setting a reload to fire on install, etc. This article was helpful in setting it up: