refactor: React 前端重构,新旧平台合并为莞易学

This commit is contained in:
study-tool
2026-10-29 23:50:46 +08:00
parent 35853891c9
commit e8634a6317
62 changed files with 8923 additions and 4623 deletions
+19
View File
@@ -0,0 +1,19 @@
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
// 构建产物直接写进仓库根的 static/,FastAPI 原样托管;开发时用 vite 代理 /api。
export default defineConfig({
plugins: [react(), tailwindcss()],
build: {
outDir: fileURLToPath(new URL('../static', import.meta.url)),
emptyOutDir: true,
},
server: {
port: 5173,
proxy: {
'/api': 'http://127.0.0.1:8848',
},
},
})