From 2e3d3163ef6a11a0ad18a890b2b884c740f9b996 Mon Sep 17 00:00:00 2001 From: zhang zhuo Date: Fri, 24 Oct 2025 18:01:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index babcd3d..bf37201 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,7 +5,7 @@ import {fileURLToPath} from 'url' export default defineConfig(({mode, command}) => { const env = loadEnv(mode, process.cwd()) - const {VITE_API_BASE} = env + const {VITE_API_BASE, VITE_APP_ENV} = env return { resolve: { alias: { @@ -18,7 +18,7 @@ export default defineConfig(({mode, command}) => { }, extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] }, - base: '/', + base: VITE_APP_ENV == 'production' ? '/super' : '/', // vite 相关配置 server: { port: 8611,