📅  最后修改于: 2022-03-11 15:02:58.958000             🧑  作者: Mango
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