chore: added runtime caching for PWA
This commit is contained in:
@@ -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,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user