Create-react-app创建的项目如何添加命令行参数

时间:2021-03-29 12:38:06   收藏:0   阅读:0
"scripts": {
    "start": "cross-env REACT_APP_CHANNEL=wizlong react-app-rewired start"
}

参数名必须以REACT_APP_开头,原因是react-script.js中做了正则校验。

技术图片

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!