mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
chore(front): remove service worker implementation to streamline front-end architecture
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
import { defaultCache } from "@serwist/vite/worker";
|
||||
import type { PrecacheEntry, SerwistGlobalConfig } from "serwist";
|
||||
import { Serwist } from "serwist";
|
||||
|
||||
// This declares the value of `injectionPoint` to TypeScript.
|
||||
// `injectionPoint` is the string that will be replaced by the
|
||||
// actual precache manifest. By default, this string is set to
|
||||
// `"self.__SW_MANIFEST"`.
|
||||
declare global {
|
||||
interface WorkerGlobalScope extends SerwistGlobalConfig {
|
||||
__SW_MANIFEST: (PrecacheEntry | string)[] | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
declare const self: ServiceWorkerGlobalScope;
|
||||
|
||||
const serwist = new Serwist({
|
||||
precacheEntries: self.__SW_MANIFEST,
|
||||
skipWaiting: true,
|
||||
clientsClaim: true,
|
||||
navigationPreload: true,
|
||||
runtimeCaching: defaultCache,
|
||||
});
|
||||
|
||||
serwist.addEventListeners();
|
||||
Reference in New Issue
Block a user