Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
OutRed
GitHub Repository: OutRed/artclass
Path: blob/main/static/loadsw.js
589 views
1
/*global UVServiceWorker,__uv$config*/
2
/*
3
* Stock service worker script.
4
* Users can provide their own sw.js if they need to extend the functionality of the service worker.
5
* Ideally, this will be registered under the scope in uv.config.js so it will not need to be modified.
6
* However, if a user changes the location of uv.bundle.js/uv.config.js or sw.js is not relative to them, they will need to modify this script locally.
7
*/
8
importScripts('uv/uv.bundle.js');
9
importScripts('uv/uv.config.js');
10
importScripts(__uv$config.sw || 'uv/uv.sw.js');
11
12
const sw = new UVServiceWorker();
13
self.addEventListener('fetch', (event) => event.respondWith(sw.fetch(event)));
14