library-picturebook-activity/java-frontend/vite.config.js
En b805f456a6 feat: 完善后端基础架构和登录功能
- 添加 Lombok 配置支持
- 完善枚举类和常量定义
- 新增工具类(TraceId、限流、OSS 等)
- 添加切面(日志、限流、TraceId)
- 更新数据库索引规范(应用层防重)
- 登录页面样式优化
- 前后端项目文档补充
2026-03-31 13:58:28 +08:00

38 lines
955 B
JavaScript

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
// 根据环境设置 base 路径
var getBase = function (mode) {
switch (mode) {
case "test":
return "/web-test/";
case "production":
return "/web/";
default:
return "/";
}
};
// https://vitejs.dev/config/
export default defineConfig(function (_a) {
var mode = _a.mode;
return {
base: getBase(mode),
plugins: [vue()],
resolve: {
alias: {
"@": resolve(__dirname, "src"),
},
},
server: {
port: 3000,
proxy: {
"/api": {
target: "http://localhost:8580",
changeOrigin: true,
rewrite: function (path) { return path.replace(/^\/api/, ''); },
},
},
},
};
});