Why: The schema renderer and design tokens moved to the new Agent-System-UI repo (D29); Frontend becomes the first host consuming it through the @ui source alias so future inbox/card/workspace components land in the shared library instead of this repo. Evidence: tsc+build clean with modules/ui materialized; vitest 9/9 pass; combined CSS (tokens.css + ui.css + styles.css) verified rule-identical to the pre-migration styles.css except comments and a collision-free block relocation; doc-ref store access replaced by injected DocBridge at the two call sites (plugin panels, card parts, HITL forms). Impact: Requires sibling modules/ui checkout (Dev worktree provides it); vite dedupe keeps single react/marked copies in the bundle. Refs: Agent-System-Documents proposal 2026-09-30-ui-inbox-command-workspace (D29)
23 lines
732 B
TypeScript
23 lines
732 B
TypeScript
import { fileURLToPath } from 'node:url'
|
||
import { defineConfig } from 'vite'
|
||
import react from '@vitejs/plugin-react'
|
||
|
||
// UI 组件库源码组合(modules/ui,源码级别名;见 Agent-System-Documents 提案 D29)。
|
||
const uiSrc = fileURLToPath(new URL('../ui/src', import.meta.url))
|
||
|
||
export default defineConfig({
|
||
plugins: [react()],
|
||
resolve: {
|
||
alias: [{ find: '@ui', replacement: uiSrc }],
|
||
// 源码组合下 ui 仓有自己的 node_modules;dedupe 强制最终 bundle 用 frontend 的单副本。
|
||
dedupe: ['react', 'react-dom', 'marked'],
|
||
},
|
||
server: {
|
||
port: 5173,
|
||
proxy: {
|
||
'/api': { target: 'http://127.0.0.1:8787', changeOrigin: false },
|
||
},
|
||
},
|
||
test: { environment: 'node' },
|
||
})
|