命令如下:
尝试以下两种方法,都只能打印出REACT_APP_ENV 字段,其他字段不显示,为什么?
cross-env AABB=dev AABB_ENV=pro REACT_APP_ENV=devAccount2 react-scripts start
cross-env REACT_APP_ENV=devAccount2 AABB_ENV=pro react-scripts start
###https://www.html.cn/create-re...
你必须以REACT_APP_
开头创建自定义环境变量。除了NODE_ENV
之外的任何其他变量都将被忽略,以避免意外地在可能具有相同名称的计算机上公开私钥。更改任何环境变量都需要重新启动正在运行的开发服务器。