import { BuildOptions } from 'esbuild'; import { AstroIntegration } from 'astro'; type AstroServiceWorkerConfig = { path?: string; assetCachePrefix?: string; assetCacheVersionID?: string; customRoutes?: string[]; /** * URL of resources to exclude in the cache */ exclude?: string[]; /** * URL of resources not generated by Astro to add in the cache */ include?: string[]; logAssets?: true; esbuild?: BuildOptions; registrationHooks?: { installing?: () => void; waiting?: () => void; active?: () => void; error?: (error: Error) => void; unsupported?: () => void; afterRegistration?: () => void; }; experimental?: { strategy?: { fetchFn: () => void; installFn: () => void; activateFn: () => void; waitFn: () => void; }; }; }; /** * @license MIT * @author Ayo Ayco */ /** * TODO: update JSDoc * Accepts configuration options with service worker path * and injects needed variables such as `__assets` generated by Astro */ declare function serviceWorker(options?: AstroServiceWorkerConfig): AstroIntegration; export { serviceWorker as default };