commit
5656cd2fc6
1 changed files with 9 additions and 4 deletions
|
|
@ -37,12 +37,17 @@ export default defineConfig({
|
|||
globPatterns: ['**/*.{js,css,html,ico,png,svg,json,wav,mp3,ogg}'],
|
||||
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',
|
||||
options: {
|
||||
cacheName: 'github-files',
|
||||
cacheName: 'external-samples',
|
||||
expiration: {
|
||||
maxEntries: 200,
|
||||
maxEntries: 5000,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 30, // <== 14 days
|
||||
},
|
||||
cacheableResponse: {
|
||||
|
|
@ -53,7 +58,7 @@ export default defineConfig({
|
|||
],
|
||||
},
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
},
|
||||
manifest: {
|
||||
includeAssets: ['favicon.ico', 'icons/apple-icon-180.png', 'favicon.svg'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue