u
This commit is contained in:
1 parent
15e0ae5b67
commit
e434374db5
71 files changed
+5726
-329
No files matched your search
@@ -7,12 +7,19 @@ export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
// @g3soft/ui 里的图标来自 ../g3soft-libs 的 pnpm store,那份 @lucide/vue 自带一个
|
||||
// vue 副本;vitest 会把它外部化交给 Node 原生加载,绕过上面的 dedupe,
|
||||
// 导致图标组件里的 inject 读到另一份 vue 的实例状态(Cannot destructure ... of undefined)。
|
||||
// 别名到本项目自己的 @lucide/vue,其内部 import 'vue' 就会原生解析到本项目的 vue。
|
||||
'@lucide/vue': fileURLToPath(new URL('./node_modules/@lucide/vue', import.meta.url)),
|
||||
},
|
||||
dedupe: ['vue', 'vue-router', 'pinia'],
|
||||
},
|
||||
test: {
|
||||
environment: 'happy-dom',
|
||||
include: ['src/**/*.{test,spec}.ts'],
|
||||
// 单元测试统一放 tests/(镜像 src 结构),不贴源放在 src 里;
|
||||
// 所以这里只收 tests/**,src 下误放的测试不会被执行。
|
||||
include: ['tests/**/*.{test,spec}.ts'],
|
||||
globals: true,
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user