pwa-asset-generator icon indicating copy to clipboard operation
pwa-asset-generator copied to clipboard

Manifest file should not receive %PUBLIC_URL% input when working with CRA

Open dantman opened this issue 2 years ago • 2 comments

Describe the bug

The README example includes --path "%PUBLIC_URL%" which I expect is for CRA support. However when using this option manifest.json paths include %PUBLIC_URL%. However CRA does not replace %PUBLIC_URL% in manifest.json.

Expected behavior

manifest.json should not receive the %PUBLIC_URL% prefix from --path.

dantman avatar Jan 19 '22 01:01 dantman

Hi @dantman, thanks for sharing your feedback and reporting the issue. I will look into it asap.

onderceylan avatar Apr 18 '22 19:04 onderceylan

As a temporary workaround, I use this in my package.json:

{
  ...
  "scripts": {
    ...
    "generate-assets": "yarn pwa-asset-generator [options] && sed -i '' 's/%PUBLIC_URL%\\///' public/manifest.json"
  },
  ...
}

az0uz avatar Jun 17 '22 13:06 az0uz