- 概览仪表盘(统计卡片 + echarts 趋势图 + Top5) - 错误列表(分页 + 筛选) - 错误详情(stack trace + 源码上下文) - 事件流水(分页 + 筛选) - 漏斗分析(动态步骤 + 转化率) - Webhook 配置(CRUD) - 高频/高危排行 Co-Authored-By: Claude <noreply@anthropic.com>
49 行
1.5 KiB
TypeScript
49 行
1.5 KiB
TypeScript
import { defineConfig, loadEnv } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, new URL('.', import.meta.url).pathname, '')
|
|
|
|
return {
|
|
base: env.VITE_APP_BASE || '/',
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({ resolvers: [ElementPlusResolver()] }),
|
|
Components({ resolvers: [ElementPlusResolver()] }),
|
|
],
|
|
resolve: {
|
|
alias: { '@': new URL('./src', import.meta.url).pathname },
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 1000,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
if (!id.includes('node_modules')) return undefined
|
|
if (id.includes('element-plus')) return 'element-plus'
|
|
if (id.includes('@element-plus/icons-vue')) return 'element-plus-icons'
|
|
if (id.includes('vue-router')) return 'vue-router'
|
|
if (id.includes('pinia')) return 'pinia'
|
|
if (id.includes('axios')) return 'axios'
|
|
return 'vendor'
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 5174,
|
|
proxy: {
|
|
'/api/log': {
|
|
target: 'http://127.0.0.1:9006',
|
|
changeOrigin: true,
|
|
rewrite: (path: string) => path.replace(/^\/api/, ''),
|
|
},
|
|
'/api': { target: 'http://127.0.0.1:8081', changeOrigin: true },
|
|
},
|
|
},
|
|
}
|
|
})
|