fix(pwa): exclude emojis/twemoji from sw precache manifest (#706)

This commit is contained in:
Joaquín Sánchez 2023-01-02 20:18:33 +01:00 committed by GitHub
parent 75f1a6b16e
commit 3563b58651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 5 deletions

View file

@ -42,7 +42,10 @@ export const pwa: VitePWANuxtOptions = {
],
},
injectManifest: {
// fonts/seguiemj.ttf is 2.77 MB, and won't be precached
maximumFileSizeToCacheInBytes: 3000000,
globPatterns: ['**/*.{js,json,css,html,txt,svg,png,ico,webp,woff,woff2,ttf,eot,otf,wasm}'],
globIgnores: ['emojis/twemoji/*.svg'],
},
devOptions: {
enabled: process.env.VITE_DEV_PWA === 'true',