refactor(env): 重构环境变量配置并简化项目设置
-移除了大部分冗余环境变量,简化了配置结构 - 更新了 API 地址配置方式,使用 VITE_API_URL 替代原有变量 - 删除了未使用的代码文件,包括 apiCodes.ts、axiosHandler.ts 和 types.d.ts - 调整了 vite 配置,使用环境变量中的 API地址 - 更新了 gitignore 文件,添加了 dist 目录的忽略项
This commit is contained in:
@ -62,10 +62,10 @@ export const setServerConfig =
|
||||
return {
|
||||
port: Number(env.APP_PORT),
|
||||
proxy: {
|
||||
[env.EO_API_URL]: {
|
||||
target: env.API_PROXY,
|
||||
'/api': {
|
||||
target: env.VITE_API_URL || 'http://lingjiapi.lvfunai.com/api',
|
||||
changeOrigin: true,
|
||||
rewrite: (path: string) => path.replace(env.EO_API_URL, ''),
|
||||
rewrite: (path: string) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
},
|
||||
...opts,
|
||||
|
||||
Reference in New Issue
Block a user