import { fileURLToPath, URL } from 'node:url' import vue from '@vitejs/plugin-vue' import { defineConfig } from 'vitest/config' export default defineConfig({ plugins: [ vue({ template: { compilerOptions: { isCustomElement: (tag) => ['view', 'text', 'scroll-view'].includes(tag) } } }) ], define: { __APP_BUILD_ID__: JSON.stringify('test-build'), __APP_GIT_COMMIT__: JSON.stringify('test-commit'), __APP_BUILD_PLATFORM__: JSON.stringify('h5') }, resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } }, test: { environment: 'node', include: ['tests/unit/**/*.spec.ts'], clearMocks: true, restoreMocks: true } })