rishabh3112 / gridsome-plugin-pwa

PWA plugin for gridsome
MIT License
30 stars 18 forks source link

options.cachedFileTypes not respected for .json filetype #85

Open theshanergy opened 2 years ago

theshanergy commented 2 years ago

https://github.com/rishabh3112/gridsome-plugin-pwa/blob/3a57346186ca446d0148334415135081b23ef561/src/files/service-worker.js#L20

service-worker.js hardcodes *.json in swConfig.globPatterns regardless of whether it is set in options.cachedFileTypes.

This forces clients to download every single page of the site, which can be a problem for sites with many pages.