I've been working on setting up an npm script for deploying react apps (specifically using create-react-app). However, I'm facing a challenge in setting the S3 bucket url string in either an environment variable or JSON file. This way, I can easily deploy to multiple buckets without having to alter the content of the package.json script each time. Despite my efforts, I haven't been able to figure out how to make this work yet.
Is there anyone who has successfully accomplished this task or has any insight on how it can be done?