diff --git a/frontend/index.html b/frontend/index.html index b4cdc0c..354a812 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -11,7 +11,8 @@ - + . /// + +declare module 'ical.js'; \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 0e9baec..85f1c19 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -67,7 +67,21 @@ export default defineConfig({ registerType: 'autoUpdate', workbox: { globPatterns: ['**/*.{js,css,html,ico,png,svg,json,vue,txt,woff2}'], - cleanupOutdatedCaches: true + cleanupOutdatedCaches: true, + runtimeCaching: [ + { + urlPattern: /^https?.*/, + handler: 'NetworkFirst', + options: { + cacheName: 'https-calls', + expiration: { + maxEntries: 150, + maxAgeSeconds: 30 * 12 * 60 * 60, // 1 month + }, + networkTimeoutSeconds: 10, // fall back to cache if api does not response within 10 seconds + }, + }, + ], }, devOptions: { enabled: true,