This commit is contained in:
MotorTruck1221 2024-08-18 00:21:03 -06:00
parent 5ae0aad1d6
commit 3b00a749b5
No known key found for this signature in database
GPG key ID: 08F417E2B8B61EA4
13 changed files with 5887 additions and 2913 deletions

20
public/sw.js Normal file
View file

@ -0,0 +1,20 @@
importScripts('/epoxy/index.js');
importScripts('/uv/uv.bundle.js');
importScripts('/uv/uv.config.js');
importScripts(__uv$config.sw || '/uv/uv.sw.js');
const uv = new UVServiceWorker();
self.addEventListener('fetch', function (event) {
if (event.request.url.startsWith(location.origin + __uv$config.prefix)) {
event.respondWith(
(async function () {
return await uv.fetch(event);
})()
);
} else {
event.respondWith(
(async function () {
return await fetch(event.request);
})()
);
}
});