Skip to content
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

Images are not included in the final directory #492

Open
vdegenne opened this issue Mar 23, 2023 · 1 comment
Open

Images are not included in the final directory #492

vdegenne opened this issue Mar 23, 2023 · 1 comment

Comments

@vdegenne
Copy link

Here's my manifest:

 plugins: [
   VitePWA({
     registerType: 'autoUpdate',
     injectRegister: 'inline',
     manifest: {
       name: 'name',
       short_name: 'ShortName',
       theme_color: '#ffffff',
       // background_color: '#000000',
       icons: [
         {
           src: './assets/img/pwa-192x192.png',
           sizes: '192x192',
           type: 'image/png',
         },
         {
           src: './assets/img/pwa-512x512.png',
           sizes: '512x512',
           type: 'image/png',
         },
       ],
     },
   }),
 ],

But when I build, images are not in dist/assets/img/

nodeJs: 18.15.0
vite: ^4.2.0
vite-plugin-pwa: ^0.14.6

@userquin
Copy link
Member

@vdegenne pwa plugin not ready to consume assets folder (Vite will transform them adding hash to the name), there is a PR WIP #397, the docs can be found here: https://vite-pwa-org.netlify.app/guide/static-assets.html#reusing-src-assets-images

imagen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants