meanbee / magento2-serviceworker

Service Worker extension for Magento 2
MIT License
52 stars 27 forks source link

Support additional extensions adding custom portions of logic to the service worker template #4

Closed punkstar closed 7 years ago

punkstar commented 7 years ago

Use Case

As an extension developer, I want to add push notifications to my online shop. To do that I need to add a custom portion of code to my service worker.

Proposed Implementation

At present, the approach that we'd suggest to do that would be to override the service worker template in your theme and add your custom logic there.

The approach agreed going forward is that this should be achieved by adding a block to a reference use within this file, allowing the extension's default service worker logic to be extended.