尝试1:
"scripts": {
"start": "react-scripts start",
"build": "set REACT_APP_STAGE=dev && react-scripts build",
"test": "react-scripts test",
}
尝试2:
"scripts":
"start": "react-scripts start",
"build": "NODE_ENV=dev&&react-scripts build",
"test": "react-scripts test"
}
//Also tried with and without space
脚本
export const configuration = process.env.NODE_ENV === 'production'
? prod
: dev;
- 总是返回本地开发并进行生产
我知道有很多问题我尝试了所有没有用的组合。