(I'm using Nuxt 3.0.0-rc.13 and @kevinmarrec/nuxt-pwa 0.9.1, but I think my question is generic to any PWA.)
In my nuxt.config.ts
file, I have defined my PWA with these two sections:
modules: [
['@kevinmarrec/nuxt-pwa'],
],
and
pwa: {
manifest: {
name: "My App",
lang: 'en'
},
workbox: {
offlineAssets: [ "/fonts/*.ttf", "/fonts/*.woff", "/fonts/*.svg" ]
}
},
When I'm connected to the internet, my fonts load and it looks right. When I'm not connected to the internet, the app works just fine but the fonts are not loaded and I get the fallback fonts.
All my fonts are hosted on the website in the /fonts
folder.