minor updates

This commit is contained in:
Rich Harris
2018-01-02 10:18:28 -05:00
parent b2dfbc752d
commit be901b9432
2 changed files with 4 additions and 3 deletions

View File

@@ -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__);

View File

@@ -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);