2026-07-24 23:57:37 -04:00
|
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
|
import { imagetools } from 'vite-imagetools';
|
|
|
|
|
import { SvelteKitPWA } from '@vite-pwa/sveltekit';
|
|
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [
|
|
|
|
|
sveltekit(),
|
|
|
|
|
imagetools(),
|
|
|
|
|
SvelteKitPWA({
|
|
|
|
|
registerType: 'autoUpdate',
|
|
|
|
|
injectRegister: false,
|
|
|
|
|
manifest: false,
|
|
|
|
|
workbox: {
|
|
|
|
|
globPatterns: ['**/*.{js,css,html,svg,woff2,webp,avif,png,ico}'],
|
|
|
|
|
navigateFallback: '/offline/index.html',
|
|
|
|
|
navigateFallbackDenylist: [/\.(?:pdf|mp4|webm|mp3)$/i],
|
2026-07-25 00:31:39 -04:00
|
|
|
globIgnores: ['**/assets/*.pdf', '**/archives/*.pdf'],
|
2026-07-24 23:57:37 -04:00
|
|
|
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024,
|
|
|
|
|
cleanupOutdatedCaches: true,
|
|
|
|
|
clientsClaim: true,
|
|
|
|
|
skipWaiting: true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
]
|
|
|
|
|
});
|