Become a member
to unlock all features

    Use a Custom Service Worker in a create-react-app PWA without Ejecting


    The default service worker that comes with create-react-app doesn't allow for very much configuration. We'll replace that default service worker in two ways.

    First, we'll create a blank service worker js file, and use that as our custom service worker.

    Next, we'll re-write the default webpack config with react-app-rewired, and utilize the InjectManifest workbox webpack plugin. This will allow us to create a totally custom service worker that still allows us to use workbox, without ejecting our app.