mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-12 02:15:17 +00:00
minor updates
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { init } from 'sapper/runtime/app.js';
|
||||
import { init } from 'sapper/runtime.js';
|
||||
|
||||
// `routes` is an array of route objects injected by Sapper
|
||||
init(document.querySelector('#sapper'), __routes__);
|
||||
@@ -1,4 +1,5 @@
|
||||
const ASSETS = `cache__timestamp__`;
|
||||
const timestamp = '__timestamp__';
|
||||
const ASSETS = `cache${timestamp}`;
|
||||
|
||||
// `shell` is an array of all the files generated by webpack,
|
||||
// `assets` is an array of everything in the `assets` directory
|
||||
@@ -60,7 +61,7 @@ self.addEventListener('fetch', event => {
|
||||
// might prefer a cache-first approach to a network-first one.)
|
||||
event.respondWith(
|
||||
caches
|
||||
.open('offline')
|
||||
.open(`offline${timestamp}`)
|
||||
.then(async cache => {
|
||||
try {
|
||||
const response = await fetch(event.request);
|
||||
|
||||
Reference in New Issue
Block a user