pwa-asset-generator
pwa-asset-generator copied to clipboard
Manifest file should not receive %PUBLIC_URL% input when working with CRA
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
.
Hi @dantman, thanks for sharing your feedback and reporting the issue. I will look into it asap.
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"
},
...
}