mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-12 10:25:16 +00:00
Merge pull request #104 from nolanlawson/nolan/sw-index-html
use service-worker-index.html in commented code
This commit is contained in:
@@ -48,12 +48,12 @@ self.addEventListener('fetch', event => {
|
||||
return;
|
||||
}
|
||||
|
||||
// for pages, you might want to serve a shell `index.html` file,
|
||||
// for pages, you might want to serve a shell `service-worker-index.html` file,
|
||||
// which Sapper has generated for you. It's not right for every
|
||||
// app, but if it's right for yours then uncomment this section
|
||||
/*
|
||||
if (url.origin === self.origin && routes.find(route => route.pattern.test(url.pathname))) {
|
||||
event.respondWith(caches.match('/index.html'));
|
||||
event.respondWith(caches.match('/service-worker-index.html'));
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user