The CreateReactApp documentation shows that you can use a limited number of .env files. https://create-react-app.dev/docs/adding-custom-environment-variables/#adding-development-environment-variables-in-env
I want to use more .env files for other environments, but .env.development is always used.
How can I use other files? I've found this article but it is not working for me. https://medium.com/@tacomanator/environments-with-create-react-app-7b645312c09d
I'm using react-scripts v3.4.1
Well, the article is actually right. I had a bug in my code, where I had hard-coded the value rather than relying on
process.env.REACT_APP_SOMEVARThese scripts in package.json work fine: