chore: added runtime caching for PWA

This commit is contained in:
Jannat Patel
2025-11-21 15:02:42 +05:30
parent 9b38e62eaf
commit 5b5c53bebc

View File

@@ -34,6 +34,16 @@ export default defineConfig({
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
globDirectory: '/assets/lms/frontend',
globPatterns: ['**/*.{js,css,html,png,svg,woff2}'],
runtimeCaching: [
{
urlPattern: ({ request }) =>
request.destination === 'document',
handler: 'NetworkFirst',
options: {
cacheName: 'html-cache',
},
},
],
},
manifest: false,
}),