You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it would be possible to have any icons that are referenced to the relative file path in the vite project would then be picked up as a static asset like referencing a static asset in source code. Then the generated manifest would point to the generated icon i.e.
The plugin then will generate the manifest referencing the filepath generated by vite similar to how vite does static asset handling. With my setup of assetsDir: 'static' that means I would expect the generated filepath to be something like `/static/android-chrome-192x192.cded8a63.png.
Currently I have to have any of the above icons in my public directory.
The text was updated successfully, but these errors were encountered:
@kalvenschraut workbox is file based, we need to do some additional work: the manifest.webmanifest should be changed (replace each icon src with the final asset name traversing the vite bundle map and find a match) but also the sw precache manifest, since we also need to add/check those entries: for example, if we include an icon from assets, this asset will be excluded by workbox since the default glob pattern doesn't include images files (https://vite-plugin-pwa.netlify.app/guide/static-assets.html#static-assets-handling), but it you change the globPatterns to include images, workbox will include it.
Once #220 merged I'll check if we can add this feature.
I was wondering if it would be possible to have any icons that are referenced to the relative file path in the vite project would then be picked up as a static asset like referencing a static asset in source code. Then the generated manifest would point to the generated icon i.e.
set the below config
The plugin then will generate the manifest referencing the filepath generated by vite similar to how vite does static asset handling. With my setup of assetsDir: 'static' that means I would expect the generated filepath to be something like `/static/android-chrome-192x192.cded8a63.png.
Currently I have to have any of the above icons in my public directory.
The text was updated successfully, but these errors were encountered: