library-picturebook-activity/lesingle-creation-frontend/vite.config.ts
En 98e9ad1d28 feat(前端): 测试环境登录框支持自动填充测试账号
通过 VITE_AUTO_FILL_TEST 环境变量控制,在 .env.test 中启用,
使测试环境构建后登录框也能自动填充测试账号,方便测试人员使用。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 17:03:22 +08:00

31 lines
630 B
TypeScript

import { defineConfig, loadEnv } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
// 所有环境统一使用根路径部署
const base = "/";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
return {
base,
plugins: [vue()],
resolve: {
alias: {
"@": resolve(__dirname, "src"),
},
},
server: {
host: "0.0.0.0",
port: 3000,
proxy: {
// 主后端
"/api": {
target: "http://localhost:8580",
changeOrigin: true,
},
},
},
};
});