This commit is contained in:
zhang zhuo 2025-10-24 18:01:04 +08:00
parent c6e12c1fdb
commit 2e3d3163ef
1 changed files with 2 additions and 2 deletions

View File

@ -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,