angular / mobile-toolkit

Tools for building progressive web apps with Angular
MIT License
1.34k stars 176 forks source link

@angular/service-worker overlapping functionality with other sw libraries #157

Open happyahluwalia opened 7 years ago

happyahluwalia commented 7 years ago

Currently the beta of @angular/service-worker is out, however Google already has sw-precache/toolbox and Workbox. I believe with @angular/service-worker it would create confusion to the users.

I was hoping that @angular library would use either of the two libraries underneath with some added functionality. But doesnt seems to be the case. Even the ngsw-manifest specification seems to be different then what sw-precache and workbox would expect.

I guess I am missing something :) Can you please throw some light how this library would be different then the other two and the advantage of using this.

webmaxru commented 7 years ago

Angular Service Worker is not designed to be mixed with any other SW library. It's fully self-standing and doesn't use neither sw-precache nor its newer version Workbox. In terms of PWA tooling for your Angular application you can use one of the approaches (both work fine):

debu-rnpr commented 7 years ago

ss I am using firebase for push notification and its uses firebase-messaging-sw.js file for background notification. I am using @angular/service-worker": "^1.0.0-beta.16 for generating service worker(for resource caching), now how to make these two service workers work together?

currently in application tab(chrome), its showing 2 service workers