aboutsummaryrefslogtreecommitdiff
path: root/src/service-worker.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/service-worker.ts')
-rw-r--r--src/service-worker.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/service-worker.ts b/src/service-worker.ts
index 1441676..b721b18 100644
--- a/src/service-worker.ts
+++ b/src/service-worker.ts
@@ -2,9 +2,13 @@ import { timestamp, files, shell, routes } from '@sapper/service-worker';
const ASSETS = `cache${timestamp}`;
+
+const nonRootFiles = files.map(f => "/Aurora-data" + f);
+const nonRootShell = shell.map(f => "/Aurora-data" + f);
+
// `shell` is an array of all the files generated by the bundler,
// `files` is an array of everything in the `static` directory
-const to_cache = (shell as string[]).concat(files as string[]);
+const to_cache = nonRootShell.concat(nonRootFiles);
const cached = new Set(to_cache);
self.addEventListener('install', <EventType extends ExtendableEvent>(event: EventType) => {