- 依赖 @stash/ui(file:../../stash-ui),统一引入 style.css 与 Toaster - 任务面板、表单、弹窗、日志、状态标签全部迁到组件库,App.css 只保留页面布局 - 移除自写 useFocusTrap,改用基于原生 dialog 的 Modal - 修复 LogViewer 流式追加时误判离开底部、导致不再自动跟随的问题 - 发布脚本检查 stash-ui 产物;README 补充组件库构建与 file: 依赖刷新说明
22 lines
473 B
TypeScript
22 lines
473 B
TypeScript
import react from '@vitejs/plugin-react'
|
|
import { defineConfig } from 'vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
// @stash/ui 是本地 file 依赖(软链),去重 React,避免加载两份运行时
|
|
resolve: {
|
|
dedupe: ['react', 'react-dom'],
|
|
},
|
|
server: {
|
|
host: '127.0.0.1',
|
|
port: 5173,
|
|
strictPort: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://127.0.0.1:3000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|