Files
ushare/frontend/vite.config.ts
loveuer 56874b754e
Some checks failed
/ build ushare (push) Has been cancelled
/ clean (push) Has been cancelled
feat: implement single binary build and env-based auth
- Unify login page styling with share page
- Add AGENTS.md with build commands and code style guidelines
- Add dev.sh and make.sh for development and production builds
- Implement single binary build with embedded frontend using embed.FS
- Change auth configuration from CLI flag to env variables (USHARE_USERNAME, USHARE_PASSWORD)
- Set default credentials: admin / ushare@123
- Fix static file serving for SPA routes
2026-01-17 23:28:21 +08:00

26 lines
529 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://127.0.0.1:9119',
changeOrigin: true
},
'/api/ulocal/ws': {
target: 'ws://127.0.0.1:9119',
rewriteWsOrigin: true,
ws: true,
},
'/ushare': {
target: 'http://127.0.0.1:9119',
changeOrigin: true
},
}
}
})