search for standard sites
pub-search.waow.tech
search
zig
blog
atproto
884 B
33 lines
1module.exports = {
2 globDirectory: '.',
3 globPatterns: [
4 '*.html',
5 '*.css',
6 '*.js',
7 'icons/*.png',
8 'platforms/*',
9 'favicon.svg',
10 'manifest.webmanifest',
11 'facts.json',
12 ],
13 globIgnores: ['sw.js', 'workbox-*.js', 'workbox-config.cjs'],
14 swDest: 'sw.js',
15 sourcemap: false,
16 skipWaiting: true,
17 clientsClaim: true,
18 cleanupOutdatedCaches: true,
19 // pages reference css/js with ?v= cache-busters; match them to the precache
20 ignoreURLParametersMatching: [/^v$/],
21 runtimeCaching: [
22 {
23 // atlas datasets are big (atlas.json ~7MB) and rebuilt every 6h — serve
24 // cached instantly, refresh in the background
25 urlPattern: /\/atlas(-mini|-avatar-cache|-theme-cache)?\.json$/,
26 handler: 'StaleWhileRevalidate',
27 options: {
28 cacheName: 'atlas-data',
29 expiration: { maxEntries: 8 },
30 },
31 },
32 ],
33}