From 1434a9cf05f4d0add6245f862839273df83e4b1a Mon Sep 17 00:00:00 2001 From: wsb1224 Date: Sun, 7 Jun 2026 20:15:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtoekn=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=92=8C=E8=AF=AD=E9=9F=B3=E8=81=8A=E5=A4=A9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env.production | 9 ++++----- frontend/vite.config.mjs | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/.env.production b/frontend/.env.production index ed21cef..bc1679c 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -1,16 +1,15 @@ # Production Environment Variables for AI Pet Companion Frontend # 用于生产环境部署 -# API Configuration - 生产环境API地址 -VITE_API_BASE_URL=https://api.wentuu.com/api +# API Configuration - 生产环境API地址(nginx 反向代理,使用相对路径) +VITE_API_BASE_URL=/api VITE_API_VERSION=v1 VITE_REQUEST_TIMEOUT=30000 -# WebSocket Configuration - 生产环境WebSocket地址 -VITE_WS_URL=wss://wentuu.com +# WebSocket Configuration - 生产环境WebSocket地址(nginx 反向代理,留空自动使用当前域名) +VITE_WS_URL= # Production Settings - 生产环境设置 -VITE_PROXY_TARGET=https://api.wentuu.com VITE_SERVER_PORT=3000 # Application Settings - 应用设置 diff --git a/frontend/vite.config.mjs b/frontend/vite.config.mjs index 62d4a1c..d80daf0 100644 --- a/frontend/vite.config.mjs +++ b/frontend/vite.config.mjs @@ -81,7 +81,7 @@ export default defineConfig({ outDir: 'dist', assetsDir: 'assets', sourcemap: false, - minify: 'terser', + minify: 'esbuild', chunkSizeWarningLimit: 1200, rollupOptions: { output: {