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
feat: allow use assets in webmanifest icons #397
Conversation
✅ Deploy Preview for vite-plugin-pwa-legacy ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@antfu maybe we can have some problem with this on EDIT: I'll check it also on îles, VitePress, SvelteKit and Astro integrations. |
I need to test all integrations, a fast review just checking source code:
/cc @ElMassimo sorry to ping you directly, maybe you can upgrade the plugin to 0.13.1 and try commenting out previous line. |
I Will try to emit the icon if missing from the bundle, I think we shouldn't add this behavior. If ppl Just want to add the icons to the assets folder instead public folder and those icons not being used (vía static import or used directly in the src attr) we need to do here the work done by Vite, no makes sense. |
It works if referenced via static import or directly in src attribute: example on vue-router on
src/App.vue
: check the docs here https://deploy-preview-397--vite-plugin-pwa-legacy.netlify.app/guide/static-assets.html#reusing-src-assets-imagesThe docs will go to old docs and the new ones, this PR on draft until finished.
On dev server with dev options enabled it just works, Vite will resolve the
src/assets/xxx
asset.closes #211 and #396