From 40bed1ef8cc2f82b54c0c0493315bbe4a5637926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B0=91=E5=BA=B7?= Date: Fri, 14 Mar 2025 09:11:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=89=93=E5=8C=85=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 ++ .env.production | 2 ++ vite.config.ts | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.development b/.env.development index 6af08f1..b145036 100644 --- a/.env.development +++ b/.env.development @@ -34,3 +34,5 @@ VITE_USER_CENTER_HOST = 'https://test.gitcode.net/child/user-center/' # ai-copilot 子应用 VITE_COPILOT_HOST = 'https://test.gitcode.net/child/aichat-app/' + +VITE_BASE_URL=/ diff --git a/.env.production b/.env.production index 8f9eba1..13fca4e 100644 --- a/.env.production +++ b/.env.production @@ -36,3 +36,5 @@ VITE_USER_CENTER_HOST = 'https://usercenter-app.gitcode.com' # ai-copilot 子应用 VITE_COPILOT_HOST = 'https://copilot-app.gitcode.com' + +VITE_BASE_URL=/openRepoPortal/ diff --git a/vite.config.ts b/vite.config.ts index e99d4c1..1002d4a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,8 +11,9 @@ const fs = require('node:fs') export default (config: any) => { const env = loadEnv(config.mode, process.cwd()); + console.log(env) return defineConfig({ - base: '/openRepoPortal/', // 确保与 Nginx 配置匹配 + base: env.VITE_BASE_URL, plugins: [ vue({ template: {