chore(projects): use json5 resolve env VITE_OTHER_SERVICE_BASE_URL & fix proxy enable

This commit is contained in:
Soybean
2024-08-14 10:25:30 +08:00
parent 26c93dff9a
commit b16a96323a
5 changed files with 14 additions and 6 deletions

View File

@ -5,10 +5,10 @@ import { createServiceConfig } from '../../src/utils/service';
* Set http proxy
*
* @param env - The current env
* @param isDev - Is development environment
* @param enable - If enable http proxy
*/
export function createViteProxy(env: Env.ImportMeta, isDev: boolean) {
const isEnableHttpProxy = isDev && env.VITE_HTTP_PROXY === 'Y';
export function createViteProxy(env: Env.ImportMeta, enable: boolean) {
const isEnableHttpProxy = enable && env.VITE_HTTP_PROXY === 'Y';
if (!isEnableHttpProxy) return undefined;