Create-react-app创建的项目如何添加命令行参数
"scripts": {
"start": "cross-env REACT_APP_CHANNEL=wizlong react-app-rewired start"
}
参数名必须以REACT_APP_开头,原因是react-script.js中做了正则校验。
"scripts": {
"start": "cross-env REACT_APP_CHANNEL=wizlong react-app-rewired start"
}
参数名必须以REACT_APP_开头,原因是react-script.js中做了正则校验。