feat: 初始化web项目,接口创建种子用户

This commit is contained in:
R524809
2026-01-05 13:29:23 +08:00
parent b387081979
commit 84ddca26b5
45 changed files with 4526 additions and 318 deletions

21
apps/web/vite.config.ts Normal file
View File

@@ -0,0 +1,21 @@
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react-swc';
// https://vite.dev/config/
export default defineConfig(({ mode }) => {
// 加载环境变量
const env = loadEnv(mode, process.cwd(), '');
return {
plugins: [react()],
server: {
port: parseInt(env.VITE_PORT || '5173', 10),
host: true, // 允许外部访问
open: true, // 自动打开浏览器
},
preview: {
port: parseInt(env.VITE_PORT || '4173', 10),
host: true,
},
};
});