Merge branch 'main' into themes

This commit is contained in:
Felix Roos 2023-02-08 20:49:20 +01:00
commit 4f0885d3af

View File

@ -37,12 +37,17 @@ export default defineConfig({
globPatterns: ['**/*.{js,css,html,ico,png,svg,json,wav,mp3,ogg}'], globPatterns: ['**/*.{js,css,html,ico,png,svg,json,wav,mp3,ogg}'],
runtimeCaching: [ runtimeCaching: [
{ {
urlPattern: /^https:\/\/raw\.githubusercontent\.com\/.*/i, urlPattern: ({ url }) =>
[
/^https:\/\/raw\.githubusercontent\.com\/.*/i,
/^https:\/\/freesound\.org\/.*/i,
/^https:\/\/shabda\.ndre\.gr\/.*/i,
].some((regex) => regex.test(url)),
handler: 'CacheFirst', handler: 'CacheFirst',
options: { options: {
cacheName: 'github-files', cacheName: 'external-samples',
expiration: { expiration: {
maxEntries: 200, maxEntries: 5000,
maxAgeSeconds: 60 * 60 * 24 * 30, // <== 14 days maxAgeSeconds: 60 * 60 * 24 * 30, // <== 14 days
}, },
cacheableResponse: { cacheableResponse: {