AgentCoord/vite.config.ts
zhaoweijie 0c571dec21 Initial commit: Multi-Agent Coordination Platform
- Vue 3 + TypeScript + Vite project structure
- Element Plus UI components with dark theme
- Pinia state management for agents and tasks
- JSPlumb integration for visual workflow editing
- SVG icon system for agent roles
- Axios request layer with API proxy configuration
- Tailwind CSS for styling
- Docker deployment with Caddy web server
- Complete development toolchain (ESLint, Prettier, Vitest)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 10:22:14 +08:00

59 lines
1.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { resolve } from 'node:path'
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import tailwindcss from '@tailwindcss/vite'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
const pathSrc = resolve(__dirname, 'src')
// https://vite.dev/config/
export default defineConfig({
plugins: [
vue(),
tailwindcss(),
vueDevTools(),
AutoImport({
imports: ['vue'],
resolvers: [ElementPlusResolver()],
eslintrc: {
enabled: false,
// 1、改为true用于生成eslint配置。2、生成后改回false避免重复生成消耗
},
}),
Components({
resolvers: [ElementPlusResolver()],
}),
createSvgIconsPlugin({
// 指定需要缓存的图标文件夹
iconDirs: [resolve(pathSrc, 'assets/icons')],
// 指定symbolId格式
symbolId: 'icon-[dir]-[name]',
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
server: {
proxy: {
'/api': {
changeOrigin: true,
// 接口地址
target: 'http://localhost:8000',
rewrite: (path: string) =>
path.replace(/^\/api/, ''),
configure: (proxy, options) => {
console.log('Proxy configured:', options)
}
},
},
}
})