import vue from '@vitejs/plugin-vue' import { fileURLToPath, URL } from 'url' import { defineConfig } from 'vitest/config' // 与 vite.config.ts 保持一致的 @ 别名,测试运行在 node 环境(仅断言模块结构,无 DOM 依赖) export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, test: { environment: 'node', }, })