Files
frontend-miniapp/vitest.config.ts
lyf e006333c0a
Some checks failed
CI / verify (push) Has been cancelled
修复 H5 来馆第三方导航构建边界
2026-07-12 00:30:18 +08:00

32 lines
738 B
TypeScript

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
}
})