-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
动态加载外部文件 #373
Comments
什么场景下需要这样做 |
我们的代码都是放在docker 里面的,這样就方便移动。 這样,我的后端程序,移动了,需要部署在其他的服务器上,那么我的前端程序就需要修改config 文件,然后重新打包,放到docker 里面去。 想问问楼主,如果我的前端可以动态加载文件、参数或者环境变量任何一种方式,我就可以通过把后端服务器的信息,通过文件、参数、或者环境变量的方式 给我的前端,這样就不需要重新打包了? |
参考这个 #348 |
docker玩法多了
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
通过npm run build 对项目进行了打包,部署到nginx 代理服务上。
我需要把 项目中访问后端服务器的配置config.js 文件中的 提取出来,进行动态加载?
能通过什么好的方式来实现吗?望楼主指点!!!
The text was updated successfully, but these errors were encountered: