Question about preloading excluded assets
See original GitHub issueI have a small app using vitesse
template (that uses this plugin) and I have a problem with some SVG images that are not included on assets directory (are too big to be inlined, and then vite just set its href to undefined, so I moved them to public directory), but then, this plugin excludes these images from PWA, or at least once installed (PWA on client), these SVG are not downloaded (and when testing offline, just alt attribute are displayed instead SVG).
I’m looking to use prefetching these SVG once the page is requested, but the problem pages are served from external server (webflux kotlin server with freemarker template) and the rest of pages are excluded (I have 4 pages, one containing a subgroup of these SVG and another containing other subgroup of these SVG). Maybe preloading all pages via html link will work (I’ve not test yet)?
I use server push on server side once each page is requested using vite manifest.json file
, so when requesting a page all resources are just cached.
Is there a way to include some prefetch via these plugin to hook into the workbox or I just need to use Cache Storage API?
Another question is about user feedback: How to integrate with these plugin?
Any suggestions are welcome.
Thx in advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Thx @antfu, I close this, I need to investigate and I feed back you when I have tried to fix inclusion of external resources bundle.
I’ll try to do something similar to
rollap-plugin-gzip
that allows to compress resources outside bundle: Configuration see additionalFiles entry.missing one n from the name?