- 创建 Vue.js 3 前端项目 (frontend/) - 实现核心功能: - 登录页面 (LoginView) - 首页 - 机器人和会话列表 (HomeView) - 聊天页面 (ChatView) - 聊天侧边栏 (ChatSidebar) - 聊天窗口 (ChatWindow) - 机器人选择器 (BotSelector) - 集成功能: - Socket.io WebSocket 连接 - Pinia 状态管理 - Axios API 客户端 - JWT 认证 - 更新版本号到 0.9.5
26 lines
464 B
TypeScript
26 lines
464 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { resolve } from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src')
|
|
}
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:9000',
|
|
changeOrigin: true
|
|
},
|
|
'/socket.io': {
|
|
target: 'http://localhost:9000',
|
|
ws: true
|
|
}
|
|
}
|
|
}
|
|
})
|