fix(projects): fix proxy config

This commit is contained in:
Soybean
2024-03-04 12:15:00 +08:00
parent b546ff8625
commit c8019c4ff7
4 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@ import { createServiceConfig } from '../../src/utils/service';
* @param env - The current env
*/
export function createViteProxy(env: Env.ImportMeta) {
const isEnableHttpProxy = env.VITE_HTTP_PROXY === 'Y';
const isEnableHttpProxy = env.DEV && env.VITE_HTTP_PROXY === 'Y';
if (!isEnableHttpProxy) return undefined;