You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.
I have certain routes that I want to be network only. I have been adding this to my generated service worker file to accomplish that. Is there an option offered by this library that I can use so I don't have to remember to edit my auto-generated service worker file every build?
self.addEventListener('fetch', function(event) {
// I have to add the following line every build
if ( event.request.url.match( '^.*(\/storage\/).*$' ) ) {
return false;
}
The text was updated successfully, but these errors were encountered:
You can create a customized copy of the default template service-worker.tmpl to handle the routes you want to ignore, then set the templateFilePath [String] option to your custom template file
With this, you will not have to remember to edit the auto-generated service worker file every build
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have certain routes that I want to be network only. I have been adding this to my generated service worker file to accomplish that. Is there an option offered by this library that I can use so I don't have to remember to edit my auto-generated service worker file every build?
The text was updated successfully, but these errors were encountered: