-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide function to filter what gets injected #192
Comments
@Snugug why not just use the |
Thanks! I'll look at that tomorrow! Maybe this winds up being a documentation issue instead of a feature request, as this config is buried under static asset handling instead of configuration of injectManifest where I expected it to be. |
@Snugug check also some hints I add on your issue 151 on chromeos |
@Snugug about the docs, just read https://vite-plugin-pwa.netlify.app/workbox/#how-is-workbox-build-related-to-vite-plugin-pwa You can see the options provided to
|
closing this since we have also included the sw for development on release version |
The
injectManifest
functionality is great for building your own custom service worker, but it appears as if the only option I have when using it is inject every file that Vite generated, or use something else. Precaching (which is what this is usually used for) should IMO be used sparingly on key important assets, not on everything. As such, I'd love a config option to pass a function, that effectively acts as a filter on the array of items being sent to Workbox to inject. I'm also happy to contribute this functionality myself if you're up for that.Thanks!
The text was updated successfully, but these errors were encountered: