vite-pwa / docs

Documentation: PWA integrations for Vite and the ecosystem
https://vite-pwa-org.netlify.app/
MIT License
197 stars 45 forks source link

Remove cache directive for workbox-* files #17

Closed piotr-cz closed 1 year ago

piotr-cz commented 1 year ago

The workbox-window.prod.es5.[HASH].js file is being generated by vite inside assets directory, There are no files generated matching above glob in dist directory.

There is no need for special cache directive, caching is already covered by location ^~ /assets/ block.

netlify[bot] commented 1 year ago

Deploy Preview for vite-pwa-org ready!

Name Link
Latest commit 34687671f2712ce6b979a768676a8adef5b8c413
Latest deploy log https://app.netlify.com/sites/vite-pwa-org/deploys/63b95aa414298600094c4852
Deploy Preview https://deploy-preview-17--vite-pwa-org.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

userquin commented 1 year ago

uhmm, when using generateSW strategy, workbox-build will generate sw.js and workbox-xxx.js in the output build folder, the file you mention is the client side of the pwa plugin (the virtual module imports workbox-window using dynamic import).

sw.js imports workbox-xxx.js, the service worker utilities from workbox-build...

piotr-cz commented 1 year ago

@userquin You are correct, I've tested only for injectManifest strategy. Thank you for detailed explanation!