diff --git a/config/config.ts b/config/config.ts index 2d0e126..cecef97 100644 --- a/config/config.ts +++ b/config/config.ts @@ -5,9 +5,7 @@ import routes from './routes'; import settings from './settings'; -const { REACT_APP_ENV } = process.env; - -const isStart = REACT_APP_ENV === 'start'; +const isStart = process.env.REACT_APP_ENV === 'start'; export default defineConfig({ hash: true, diff --git a/package.json b/package.json index a9755b5..632e088 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,9 @@ "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less", "precommit": "lint-staged", "prettier": "prettier -c --write \"src/**/*\"", - "start": "cross-env PORT=9002 HOST=0.0.0.0 REACT_APP_ENV=dev UMI_ENV=dev umi dev", - "start:uat": "cross-env PORT=9002 HOST=0.0.0.0 REACT_APP_ENV=dev UMI_ENV=uat umi dev", - "start:prod": "cross-env PORT=9002 HOST=0.0.0.0 REACT_APP_ENV=dev UMI_ENV=prod umi dev", + "start": "cross-env PORT=9002 HOST=0.0.0.0 REACT_APP_ENV=start UMI_ENV=dev umi dev", + "start:uat": "cross-env PORT=9002 HOST=0.0.0.0 REACT_APP_ENV=start UMI_ENV=uat umi dev", + "start:prod": "cross-env PORT=9002 HOST=0.0.0.0 REACT_APP_ENV=start UMI_ENV=prod umi dev", "tsc": "tsc --noEmit" }, "lint-staged": {