Files
MyGoNavi/frontend/vite.config.ts
Syngnat 3f4b247faa feat(native-window): 完善原生独立窗口与跨屏拖拽
- 支持全部工作台标签与 AI 对话在多显示器中原生独立展示
- 修复拖拽指针捕获,恢复关闭、右键菜单和跨窗口释放识别
- 拆分子窗启动入口并按需加载语言与工作台内容
- 内容与 Monaco 完成可见绘制后再提交迁移,消除白屏和加载闪烁
- 加固结果编辑、宿主同步及关闭、超时和焦点竞态
2026-07-17 16:06:24 +08:00

48 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
test: {
setupFiles: ['./src/test/setupI18nCatalogs.ts'],
},
optimizeDeps: {
// Pre-bundle startup locale modules before Wails starts proxying the WebView.
include: [
'antd/locale/de_DE',
'antd/locale/en_US',
'antd/locale/ja_JP',
'antd/locale/ru_RU',
'antd/locale/zh_CN',
'antd/locale/zh_TW',
'dayjs/locale/de',
'dayjs/locale/ja',
'dayjs/locale/ru',
'dayjs/locale/zh-cn',
'dayjs/locale/zh-tw',
],
},
server: {
host: '127.0.0.1',
port: 5173,
strictPort: true,
},
build: {
outDir: 'dist', // Standard Wails output directory
emptyOutDir: true,
rollupOptions: {
output: {
// 拆分大体积三方依赖到独立 chunk避免主 bundle 过大
// reactflow + dagre 约 130KB gzipped单独成 chunk 可按需加载
// recharts 用于诊断面板统计条,与执行计划图无强依赖,单独 chunk
manualChunks: {
reactflow: ['reactflow'],
dagre: ['dagre'],
charts: ['recharts'],
},
},
},
}
})