nuxt-community / pwa-module

Zero config PWA solution for Nuxt.js
https://pwa.nuxtjs.org
MIT License
1.23k stars 171 forks source link

Setting service worker to exclude certain urls only #422

Closed vghernandz closed 3 years ago

vghernandz commented 3 years ago

Hi guys!!! require to be able to exclude from firebase-auth-sw.js some fetch url, something similar to this ...

self.addEventListener( 'fetch', function ( event ) {
    if ( event.request.url.match( '^.*(\/youtube\/).*$' ) ) {
        return false;
    }
})

I looked in the documentation but I did not find something that allows me to do it, swTemplate it probably helps to do it but I don't know how to declare the code.

If there is a better way I would be very grateful 👍

vghernandz commented 3 years ago

not finding a solution, I had no choice but to uninstall @nuxtjs/firebase