'how to insert environment variable from .env file in pwa react for manifest.webmanifest?
I have a situation with a react PWA where I need the app manifest to take the values from the .env config file, I have tried to do it in the following ways but no result in displaying the name property of the manifest:
- "name": "REACT_APP_MANIFEST_NAME",
- "name": "%REACT_APP_MANIFEST_NAME%",
- "name": "$((REACT_APP_MANIFEST_NAME))",
- "name": "((REACT_APP_MANIFEST_NAME))",
- "name": REACT_APP_MANIFEST_NAME,
- "name": %REACT_APP_MANIFEST_NAME%.
- "name": $((REACT_APP_MANIFEST_NAME)),
- "name": ((REACT_APP_MANIFEST_NAME)),
This is what it shows me when I add the PWA to the home screen: screenshot name app download
I clarify that the values would be taking them, in the same way I dynamically call the icons through an environment variable that stores the icon path data. The problem occurs in the download name of the PWA. Thank you in advance for any suggestions! PS: If considering that the information that I leave is incomplete or that it is incomprehensible, I accept the suggestion for the edition, I was looking for a lot of information on this subject and there is little about the dynamic manifests (without being with subdomains) of the PWA with React.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
