fix: 修改全局地址映射名字

This commit is contained in:
chansee97 2025-08-20 17:46:46 +08:00
parent 050ab3e7ed
commit ac9d7e84e5
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ export interface ServiceProxyPluginOptions {
devEnvName?: ServiceEnvType
/** 是否启用代理配置 */
enableProxy?: boolean
/** 环境变量名(可选,默认为 '__PROXY_MAPPING__' */
/** 环境变量名(可选,默认为 '__URL_MAP__' */
envName?: string
/** d.ts 类型文件生成路径(可选,如果传入路径则在该路径生成 d.ts 类型文件) */
dts?: string
@ -50,7 +50,7 @@ export default function createServiceProxyPlugin(options: ServiceProxyPluginOpti
devEnvName = 'development',
proxyPrefix = 'proxy-',
enableProxy = true,
envName = '__PROXY_MAPPING__',
envName = '__URL_MAP__',
dts,
} = options

View File

@ -1,7 +1,7 @@
import { createAlovaInstance } from './alova'
export const request = createAlovaInstance({
baseURL: __PROXY_MAPPING__.url.path,
baseURL: __URL_MAP__.url.path,
})
export const blankInstance = createAlovaInstance({