- 事件中心:去彩虹图表,改专业排名列表 + 主题变量 - 网络/配置/存储:ResourceVisualEditor 双向 YAML 同步、导入 YAML、新建 - vite manualChunks 减小 embed 主包体积 - run.sh:多副本强制 MODE=release + MySQL/Redis - Deployment 编辑:共享 manifest、统一 saveDeploymentManifest - 修复存储挂载 initContainers 混入 bug、补 Tolerations UI - 服务 Tab:applyYAML 创建 + ResourceVisualEditor 编辑 - 基本信息:Pod 模板标签 + Selector 同步
61 lines
1.8 KiB
TypeScript
61 lines
1.8 KiB
TypeScript
import path from "path"
|
|
import react from "@vitejs/plugin-react"
|
|
import { defineConfig } from "vite"
|
|
import { inspectAttr } from 'kimi-plugin-inspect-react'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
// 必须用绝对路径,否则 /audit/terminal 等深链会解析成 /audit/assets/... 导致白屏 // Logan.Li
|
|
base: '/',
|
|
plugins: [inspectAttr(), react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
// 按 vendor 拆包,减小 embed 主包体积 // Logan.Li
|
|
manualChunks(id) {
|
|
if (!id.includes("node_modules")) return
|
|
// recharts 须在 react 之前匹配,避免 vendor 循环依赖 // Logan.Li
|
|
if (id.includes("recharts") || id.includes("/d3-")) return "vendor-charts"
|
|
if (id.includes("react-dom") || id.includes("react-router") || /[/\\]react[/\\]/.test(id)) {
|
|
return "vendor-react"
|
|
}
|
|
if (id.includes("@codemirror") || id.includes("@uiw/react-codemirror")) return "vendor-codemirror"
|
|
if (id.includes("xterm")) return "vendor-xterm"
|
|
if (id.includes("@radix-ui")) return "vendor-radix"
|
|
if (id.includes("@tanstack")) return "vendor-query"
|
|
if (id.includes("lucide-react")) return "vendor-icons"
|
|
},
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 600,
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
host: true,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
"/ws": {
|
|
target: "http://localhost:8080",
|
|
ws: true,
|
|
changeOrigin: true,
|
|
},
|
|
"/health": {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
"/version": {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|