init: F9智慧缫丝系统 - 后端(server) + 主前端(web) + 打印设计器(openprint) 首次提交

This commit is contained in:
2026-08-15 15:37:25 +08:00
commit 7235265749
294 changed files with 59182 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
// 测试配置:复用项目的 @ alias;环境用 happy-dom(无真实排版,纯函数测试足够)。
// 不引入 unocss 插件——核心单测不依赖 unocss 虚拟模块,避免测试期副作用。
export default defineConfig({
// vue() 插件类型与 vitest 内置 viterolldown/rollup 双实现)存在类型冲突,
// 此处为测试配置,强制 any 以通过 vue-tsc 类型检查(不影响运行)。
plugins: [vue() as unknown as never],
server: {
host: '0.0.0.0',
port: 5227,
open: true,
},
preview: {
port: 5227,
host: '0.0.0.0'
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
test: {
environment: 'happy-dom',
globals: false,
include: ['src/**/*.spec.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'html'],
include: ['src/core/**/*.ts', 'src/design/preview/**/*.ts', 'src/repository/mock/**/*.ts'],
exclude: ['src/core/**/*.d.ts', 'src/core/**/index.ts'],
},
},
})