feat():learning后台管理前端页面初始化

This commit is contained in:
yuj
2025-12-04 17:51:24 +08:00
commit 83a614bd75
97 changed files with 23324 additions and 0 deletions

26
vite.config.ts Normal file
View File

@@ -0,0 +1,26 @@
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig(({ mode }) => {
// 加载环境变量
const env = loadEnv(mode, process.cwd())
return {
plugins: [react()],
server: {
port: 3003,
host: '0.0.0.0',
open: true,
headers: {
'Content-Security-Policy': "default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:;"
},
proxy: {
'/api': {
target: env.VITE_API_BASE_URL || 'http://localhost:8087',
changeOrigin: true,
},
},
},
}
})