DEV Community

Arnav Bansal
Arnav Bansal

Posted on

How do you customize service workers for Angular 6+? I'm making use of Firebase, and it needs a service worker.

I'm using Ionic 4/Angular 6 with Firebase.

I enabled Angular with this command

ng add @angular/pwa@v6-lts --project app

It generated ngsw-config.json, which generates a service worker in production. But how do I add code to the service worker?

I'm adding Firebase to it, to make use of Firebase Cloud Messaging.

Top comments (0)