- 更新 @commitlint/cli、@commitlint/config-conventional、@types/bun、typescript-eslint 至最新 patch 版本 - vite.config.ts 添加 emptyOutDir: true 消除构建 outDir 警告 - DEVELOPMENT.md TrendChart 描述从"双轴折线图(耗时/可用率)"修正为"趋势折线图(耗时+延迟范围)"
38 lines
894 B
TypeScript
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",
|
|
},
|
|
},
|
|
});
|