- 实现了完整的登录注册认证流程,包括密码验证和用户资料获取 - 集成了JWT令牌管理和自动刷新机制,支持设备ID生成和管理 - 添加了WebSocket连接配置和API基础URL环境变量设置 - 实现了API客户端的请求拦截器,包括令牌验证和错误处理逻辑 - 集成了MD5加密和认证令牌缓存机制,提升安全性 - 添加了多语言国际化支持,包括英语、中文、马来语和印尼语 - 实现了认证状态管理和本地存储持久化功能 - 添加了表单验证schema和错误处理机制,增强用户体验
36 lines
884 B
TypeScript
36 lines
884 B
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
import babel from '@rolldown/plugin-babel'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { tanstackRouter } from '@tanstack/router-plugin/vite'
|
|
import react, { reactCompilerPreset } from '@vitejs/plugin-react'
|
|
import { defineConfig } from 'vite'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
port: 9999,
|
|
host: '0.0.0.0',
|
|
allowedHosts: ['darlena-nonexpiring-cathie.ngrok-free.dev'],
|
|
proxy: {
|
|
'/api': {
|
|
target: 'https://zihua-api.h55555game.top',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
plugins: [
|
|
tanstackRouter({
|
|
target: 'react',
|
|
autoCodeSplitting: true,
|
|
}),
|
|
tailwindcss(),
|
|
react(),
|
|
babel({ presets: [reactCompilerPreset()] }),
|
|
],
|
|
})
|