Problem: wanted to pass environment variables to an app created with create-react-app ( in development )
This is how I did it ( not exactly sure which version of react-scripts I’m using, since I ejected the config ):
- create a .env.development file, in your app’s root folder and add your variables there:
- open config/envs.js and add your variable to the object in getClientEnvironment function: