forked from ORGANISATION-KA-INTERNATIONALE/FEDIVERSE-OKI
41 lines
980 B
TypeScript
41 lines
980 B
TypeScript
|
|
import adapter from '@sveltejs/adapter-static';
|
||
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
||
|
|
import { defineConfig } from 'vite';
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [
|
||
|
|
sveltekit({
|
||
|
|
compilerOptions: {
|
||
|
|
runes: ({ filename }) =>
|
||
|
|
filename.split(/[/\\]/).includes('node_modules') ? undefined : true
|
||
|
|
},
|
||
|
|
paths: {
|
||
|
|
relative: false
|
||
|
|
},
|
||
|
|
adapter: adapter({
|
||
|
|
pages: 'build',
|
||
|
|
assets: 'build',
|
||
|
|
fallback: undefined,
|
||
|
|
precompress: false,
|
||
|
|
strict: true
|
||
|
|
})
|
||
|
|
}),
|
||
|
|
VitePWA({
|
||
|
|
registerType: 'autoUpdate',
|
||
|
|
injectRegister: false,
|
||
|
|
manifest: false,
|
||
|
|
strategies: 'generateSW',
|
||
|
|
workbox: {
|
||
|
|
navigateFallback: '/offline/index.html',
|
||
|
|
navigateFallbackDenylist: [/^\/search-index\.json$/, /\/[^/]+\.[a-z0-9]+$/i],
|
||
|
|
globIgnores: ['**/*.pdf'],
|
||
|
|
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024,
|
||
|
|
cleanupOutdatedCaches: true,
|
||
|
|
clientsClaim: true,
|
||
|
|
skipWaiting: true
|
||
|
|
}
|
||
|
|
})
|
||
|
|
]
|
||
|
|
});
|