vite-pwa / vite-plugin-pwa

Zero-config PWA for Vite
https://vite-pwa-org.netlify.app/
MIT License
3.22k stars 211 forks source link

Optimize loading `workbox::injectManifest` #749

Closed userquin closed 2 months ago

userquin commented 2 months ago

If the user disables injection point, there is no need to load workbox here https://github.com/vite-pwa/vite-plugin-pwa/blob/dd3e003af3c62541f54aa4d863626ea5a70a2de5/src/modules.ts#L102-L105

We can just provide the promise to the custom vite build and await when there is injection point.