Closed quhongli123 closed 1 month ago
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Title: 🐞 Feedback question: Please fill in the title, do not leave it blank
@quhongli123 这应该是一个基础性问题,不属于 Rainbond 的问题
npm start
yarn start
,这个时候是可以读取到本地环境变量的。Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@quhongli123 This should be a basic problem, not a Rainbond problem
- When you start locally, it is actually on the server side, such as
npm start
yarn start
, and you can read the local environment variables at this time.- It is deployed using nginx after packaging on rainbond. After packaging, it is static files, so it is definitely impossible to obtain the system environment variables.
请先确认以下事项:
问题描述
前端如何获取到从rainbond配置的环境变量
该问题是否可以稳定重现?
可重现
重现步骤
本地配置的环境变量可以正常访问到 但从rainbond配置的环境 线上是访问不到的
截图
日志
1
期望结果
可以获取到配置项
解决方案(可选)
No response
操作系统 && Rainbond 版本
V6.2
是否愿意提交 PR 解决该问题?