Answers for "how to build with a specific .env file node"

0

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
Posted by: Guest on September-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language