mirror of
https://github.com/HuLaSpark/HuLa.git
synced 2026-09-24 23:11:59 +08:00
* refactor(common): ♻️ login data init * refactor(common): ♻️ login refactor * fix(common): 🐛 mobile set auto login after login * fix(common): 🐛 ios splash screen auto login * fix(common): 🐛 ios splash screen close * fix(mobile): 🐛 personal information display * refactor(global import): ♻️ refactoring global import to distinguish pc from mobile * fix(common): 🐛 fix mobile layout * fix(common): 🐛 set mobile safe area in app.vue * fix(common): 🐛 delete SafeAreaComponent * build(build): 📦 improve mobile and pc component import files * refactor(common): ♻️ remove mobile client * build(build): 📦 remove components*.d.ts * fix(common): 🐛 android safe area * fix(common): 🐛 android safe area * fix(mobile): 🐛 refine the message text for withdrawal, and add a mobile phone clipboard * fix(system): 🐛 fix storage logic causing logins to fail fix white screen issues on some ios pages due to top safe zone * feat(mobile): ✨ adapt mobile chat room input box * fix(mobile): 🐛 modify Android ports and some mobile styles --------- Co-authored-by: wanwanruwoxin <254693270@qq.com> Co-authored-by: 乾乾 <1046762075@qq.com> Co-authored-by: kazai <kazai_xiaohe@gmail.com>
54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
/// <reference types="vitest" />
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { defineConfig } from 'vitest/config'
|
|
import { getComponentsDirs, getComponentsDtsPath } from './build/config/components'
|
|
import { getRootPath, getSrcPath } from './build/config/getPath'
|
|
|
|
const testPlatform = process.env.TAURI_ENV_PLATFORM
|
|
const testComponentsDirs = getComponentsDirs(testPlatform)
|
|
const testComponentsDtsPath = getComponentsDtsPath(testPlatform)
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
vueJsx(),
|
|
AutoImport({
|
|
imports: [
|
|
'vue',
|
|
'vue-router',
|
|
'pinia',
|
|
{ 'naive-ui': ['useDialog', 'useMessage', 'useNotification', 'useLoadingBar', 'useModal'] }
|
|
],
|
|
dts: 'src/typings/auto-imports.d.ts'
|
|
}),
|
|
/**自动导入组件,但是不会自动导入jsx和tsx*/
|
|
Components({
|
|
dirs: testComponentsDirs, // 根据环境加载对应组件目录
|
|
resolvers: [NaiveUiResolver()],
|
|
dts: testComponentsDtsPath
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': getSrcPath(),
|
|
'~': getRootPath()
|
|
}
|
|
},
|
|
test: {
|
|
environment: 'happy-dom',
|
|
globals: true,
|
|
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
include: ['src/**/*.{vue,js,jsx,ts,tsx}'],
|
|
exclude: ['src/**/*.{test,spec}.{js,ts}', 'src/types/**', 'src/**/*.d.ts']
|
|
}
|
|
}
|
|
})
|