diff --git a/packages/vite-plugin/src/proxy/index.ts b/packages/vite-plugin/src/proxy/index.ts index 6dc966c..9d7e4e9 100644 --- a/packages/vite-plugin/src/proxy/index.ts +++ b/packages/vite-plugin/src/proxy/index.ts @@ -26,12 +26,8 @@ export function getProxyTarget(proxy: any) { const value = match[1]; try { - if (config.type == "uniapp-x") { - return proxy[value].target; - } else { - const { target, rewrite } = proxy[`/${value}/`]; - return target + rewrite(`/${value}`); - } + const { target, rewrite } = proxy[`/${value}/`]; + return target + rewrite(`/${value}`); } catch (err) { error(`[cool-proxy] Error:${value} → ` + getPath()); return "";