chore: 初始化平台管理端
This commit is contained in:
30
vitest.config.ts
Normal file
30
vitest.config.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { defineConfig } from 'vitest/config'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'@views': resolvePath('src/views'),
|
||||
'@imgs': resolvePath('src/assets/images'),
|
||||
'@icons': resolvePath('src/assets/icons'),
|
||||
'@utils': resolvePath('src/utils'),
|
||||
'@stores': resolvePath('src/store'),
|
||||
'@styles': resolvePath('src/assets/styles')
|
||||
}
|
||||
},
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
globals: false,
|
||||
clearMocks: true,
|
||||
// Windows + vite-node sourcemap edge case can surface as unhandled errors.
|
||||
dangerouslyIgnoreUnhandledErrors: true
|
||||
}
|
||||
})
|
||||
|
||||
function resolvePath(paths: string) {
|
||||
return path.resolve(__dirname, paths)
|
||||
}
|
||||
Reference in New Issue
Block a user