magento / pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.07k stars 684 forks source link

How do you edit the PWA manifest after scaffolding? #2908

Closed Skavengerr closed 3 years ago

Skavengerr commented 3 years ago

Hello, now when i opening my manifest in builded project i see that one image I tried adding mine in the root of the project, but nothing worked. So how can I edit my manifest?

m2-assistant[bot] commented 3 years ago

Hi @Skavengerr. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


huykon commented 3 years ago

You can edit manifest.json on path: packages/venia-ui/venia-static/manifest.json

Skavengerr commented 3 years ago

@huykon Yeah, but it's in a node_modules and if I reinstall them I have to edit again

huykon commented 3 years ago

no. This file not in path of node_modules

Skavengerr commented 3 years ago

@huykon I created a project with 'yarn create @magento/pwa' and after installing the project I have this structure image

sirugh commented 3 years ago

@Skavengerr One idea - clone venia-static to a new folder in your project root and update your upward.yml to route to a different static folder instead of venia-static. That might work. I might be missing something but I would have thought it'd be easy to modify the manifest after scaffolding. @revanth0212 you've got some experience around this directory/upward. Any thoughts?

revanth0212 commented 3 years ago

Theoretically, the workaround that @sirugh suggested should work, since we are adding a new manifest.json file to the project and the new scaffolded app's template.html has a link mentioned this way <link rel="manifest" href="/manifest.json">.

That said, I will create a ticket in our backlog to make the scaffold logic to eject a manifest.json file during the creation process. Not sure why we are not ejecting one, maybe @zetlen knows.

revanth0212 commented 3 years ago

Hello, @Skavengerr I have created an internal ticket on our backlog to investigate the issue. Thank you for your question, please let us know if the workaround that @sirugh suggested works.

https://jira.corp.magento.com/browse/PWA-1203

Skavengerr commented 3 years ago

@revanth0212 @sirugh Thank's a lot, I will try it. Could you provide an example of updated upward.yml?