capacitor-assets icon indicating copy to clipboard operation
capacitor-assets copied to clipboard

Option to set PWA icons destination

Open muuvmuuv opened this issue 2 years ago • 8 comments

Would be great if I could manually set the path where the PWA icons are being placed. In our case, we have a folder "resources" which holds non-shared assets per App (we have a nx workspace with more than one app).

muuvmuuv avatar Nov 07 '22 10:11 muuvmuuv

Meaning the output directory for generated PWA assets?

mlynch avatar Nov 09 '22 21:11 mlynch

Yes. And maybe another option for the icon source base path. In our case, it prefixed every source with ../ which didn't work. I guess that happened because we call the script outside the root directory and some paths joins break.

muuvmuuv avatar Nov 09 '22 21:11 muuvmuuv

folders outside src seems to be unreachable via web browser image

peplocanto avatar Nov 15 '22 11:11 peplocanto

This is definitely needed - I need my icons folder to be put in the same public folder as the manifest.webmanifest file

devlsh avatar Jan 22 '23 13:01 devlsh

yeah... its basicly impossible to use this asset generator for pwa currently without a fix :)

SvenBudak avatar Apr 30 '23 15:04 SvenBudak

I agree, I think we have standard Angular structure and when you see this part of PWA generator code then it is clear it always return empty string from getPWAAssetsDirectory (unless you have assets folder in your assets folder...) and actual computed pwaDir is ignored... maybe pwaDir should be returned and this is just bug? When I do that change locally I get the resources correctly generated in right place for Angular...

image

dobripet avatar May 15 '23 10:05 dobripet

@dobripet can you create a PR for this fix ? 😄

bastienlemaitre avatar Jul 20 '23 11:07 bastienlemaitre

Oh, so there really are no options to set the output folder. I thought it was strange since there's a --pwaManifestPath, so, surely, there must be a flag to select the destination folder, right?

Also setting "src": "../icons" in manifest.webmanifest is... strange. We should be able to set the prefix.

NatoBoram avatar Aug 06 '23 23:08 NatoBoram