1 Star 0 Fork 426

星魂不朽 / soybean-admin

forked from Soybean / soybean-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.env-config.ts 653 Bytes
一键复制 编辑 原始数据 按行查看 历史
elliotliu 提交于 2023-03-07 15:51 . proxy fail fix
/** 请求服务的环境配置 */
type ServiceEnv = Record<ServiceEnvType, ServiceEnvConfig>;
/** 不同请求服务的环境配置 */
const serviceEnv: ServiceEnv = {
dev: {
url: 'http://localhost:8080'
},
test: {
url: 'http://localhost:8080'
},
prod: {
url: 'http://localhost:8080'
}
};
/**
* 获取当前环境模式下的请求服务的配置
* @param env 环境
*/
export function getServiceEnvConfig(env: ImportMetaEnv): ServiceEnvConfigWithProxyPattern {
const { VITE_SERVICE_ENV = 'dev' } = env;
const config = serviceEnv[VITE_SERVICE_ENV];
return {
...config,
proxyPattern: '/proxy-pattern'
};
}
1
https://gitee.com/xinghunbuxiu/soybean-admin.git
git@gitee.com:xinghunbuxiu/soybean-admin.git
xinghunbuxiu
soybean-admin
soybean-admin
main

搜索帮助