One of the greatest feature of PWA Extension is adding editable Service Worker File.

This adds a big value if you want to customize service worker for your needs.

Follow steps : 

  1. Go to Plugins
  2. Search for PWA
  3. You will see : System - PWA Progressive Web App
  4. Click on to the title and visit plugin admin panel.
  5. Go to Section / Tab "Extras"
  6. Find parameter "Add custom js to service worker file" and swith it to "YES"
  7. New field opens automatically : "Custom JS for Service Worker"
  8. Add your code to the text area
  9. Go to up and find parameter "Re-create Service Worker"
  10. Select "YES"
  11. Click to "SAVE" and do this one more time to safe the creation

Now your new service worker is ready.

You can check it via URL :