how to build with a specific .env file node
npm install --save-dev env-cmd
// Then updated package.json accordingly:
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"build:stage": "env-cmd -f ./.env.stage npm run-script build"
}
// Then run the following command:
npm run build:stage