1
0
Files
DiAL/vite.config.ts
lanyuanxiaoyao 2b08f81a0d chore: 依赖版本更新、Vite 构建配置完善、TrendChart 描述修正
- 更新 @commitlint/cli、@commitlint/config-conventional、@types/bun、typescript-eslint 至最新 patch 版本
- vite.config.ts 添加 emptyOutDir: true 消除构建 outDir 警告
- DEVELOPMENT.md TrendChart 描述从"双轴折线图(耗时/可用率)"修正为"趋势折线图(耗时+延迟范围)"
2026-05-15 15:15:57 +08:00

38 lines
894 B
TypeScript

import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
build: {
emptyOutDir: true,
outDir: "../../dist/web",
rolldownOptions: {
output: {
codeSplitting: {
groups: [
{
name: "vendor-react",
test: /[\\/]node_modules[\\/](react|react-dom|scheduler)[\\/]/,
},
{
name: "vendor-tdesign",
test: /[\\/]node_modules[\\/](tdesign-react|tdesign-icons-react)[\\/]/,
},
{
name: "vendor-chart",
test: /[\\/]node_modules[\\/](recharts|d3-.*)[\\/]/,
},
],
},
},
},
},
plugins: [react()],
root: "src/web",
server: {
proxy: {
"/api": "http://127.0.0.1:3000",
"/health": "http://127.0.0.1:3000",
},
},
});