yarn add -D dotenv-cli
package.json
"scripts": {
"build:development": "dotenv -e .env.development react-scripts build",
"build:staging": "dotenv -e .env.staging react-scripts build",
"build:production": "dotenv -e .env.production react-scripts build",
},