前端项目初始化,登录页支持暗色主题与禁止滑动

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
fish
2026-04-26 14:40:55 +08:00
parent bd258e19c2
commit c91e038953
29 changed files with 994 additions and 53 deletions

31
frontend/vite.config.ts Normal file
View File

@@ -0,0 +1,31 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig(({ mode }) => ({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
host: '0.0.0.0',
port: 5173,
strictPort: true,
watch: {
usePolling: true,
},
proxy: {
'/api': {
target: process.env.VITE_API_BASE_URL || 'http://host.docker.internal:80',
changeOrigin: true,
secure: false,
},
},
},
build: {
outDir: 'dist',
sourcemap: mode !== 'production',
},
}))