Files
XCTerminal/vite.config.ts
ssdfasd 346fa9b7e0 feat: 实现 2x3 终端面板网格布局
- 抽取 TerminalPanel 组件实现多终端支持
- 使用 CSS Grid 实现 2x3 布局 (6个面板)
- 添加连接延迟错开同时连接 (0-1000ms)
- 后端添加 CORS 支持
- Vite 代理添加 WebSocket 支持

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 00:48:50 +08:00

30 lines
598 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
define: {
'process.env': {},
global: 'globalThis',
},
server: {
proxy: {
'/api': {
target: 'http://localhost:3002',
changeOrigin: true,
ws: true,
rewrite: (path) => path,
},
},
},
})