This commit is contained in:
oneao committed 2026-10-09 22:05:02 +08:00
1 parent 0be0b0767a
commit 5f28a10d89
852 files changed
+8962 -111755

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
// link 进来的 @g3soft/ui 会带自己的 vue 副本,不去重会导致响应式失效
// (组件内 ref 变化不触发外部渲染)——link 方案最经典的坑。
dedupe: ['vue', 'vue-router', 'pinia'],
},
server: {
host: true,
port: 5090,
strictPort: true,
watch: {
// 忽略工具原子写入产生的临时文件(形如 .xxx.tmpdir\xxx.tmp),
// 避免 Windows 下 fs.watch 对瞬时存在的临时路径抛 EBUSY 导致 dev server 崩溃
ignored: [/[\\/]\.tmpdir[\\/]/, /\.tmp$/],
},
proxy: {
'/api': {
target: process.env.VITE_PROXY_TARGET || 'http://127.0.0.1:8088',
changeOrigin: true,
},
},
},
plugins: [vue()],
})