You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
类似 Vue CLI https://cli.vuejs.org/zh/guide/mode-and-env.html#%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F
支持项目根目录中放置下列文件来指定环境变量
在其中配置TARO_APP_开头的变量,并静态地嵌入到客户端侧的代码中
譬如在
.env.staging
中配置:然后在构建时指定环境:
build --mode staging
使用
process.env.TARO_APP_NOT_SECRET_CODE
来获取到some_value
的值Beta Was this translation helpful? Give feedback.
All reactions