PWA minimal service worker just for trigger the install button?

What is the minimal service worker just for trigger the install button?

I don’t want cacheing anything and the app can’t works in offline mode, but i want allow users to create a shortcut on the desktop.

Answer

Seems like the minimal service worker would be this one

self.addEventListener('fetch', function(event) {
  event.respondWith(fetch(event.request));
});

Taken from the Google Developers PWA documentation