mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
feat: 更新vite配置和组件类型定义,优化初始化逻辑
- 在vite.config.mts中添加rollup外部依赖配置,排除naive-ui - 在components.d.ts中移除不必要的naive-ui组件类型 - 在Initializer.ts中调整导入顺序,优化代码结构
This commit is contained in:
4
src/components.d.ts
vendored
4
src/components.d.ts
vendored
@@ -22,19 +22,15 @@ declare module 'vue' {
|
||||
NAvatar: typeof import('naive-ui')['NAvatar']
|
||||
NButton: typeof import('naive-ui')['NButton']
|
||||
NCard: typeof import('naive-ui')['NCard']
|
||||
NDi: typeof import('naive-ui')['NDi']
|
||||
NEmpty: typeof import('naive-ui')['NEmpty']
|
||||
NFlex: typeof import('naive-ui')['NFlex']
|
||||
NFormItemGi: typeof import('naive-ui')['NFormItemGi']
|
||||
NGlobalStyle: typeof import('naive-ui')['NGlobalStyle']
|
||||
NGridItem: typeof import('naive-ui')['NGridItem']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NImage: typeof import('naive-ui')['NImage']
|
||||
NInputGroup: typeof import('naive-ui')['NInputGroup']
|
||||
NPopconfirm: typeof import('naive-ui')['NPopconfirm']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NSpin: typeof import('naive-ui')['NSpin']
|
||||
NTag: typeof import('naive-ui')['NTag']
|
||||
NText: typeof import('naive-ui')['NText']
|
||||
NTime: typeof import('naive-ui')['NTime']
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { GetSelfAccount, useAccount, UpdateAccountLoop } from "@/api/account";
|
||||
import { GetSelfAccount, UpdateAccountLoop, useAccount } from "@/api/account";
|
||||
import { QueryGetAPI } from "@/api/query";
|
||||
import { useBiliAuth } from "@/store/useBiliAuth";
|
||||
import { useNotificationStore } from "@/store/useNotificationStore";
|
||||
import { createDiscreteApi, NText, NFlex, NButton } from "naive-ui";
|
||||
import { BASE_API_URL, isTauri, apiFail } from "./constants";
|
||||
import { GetNotifactions } from "./notifactions";
|
||||
import HyperDX from '@hyperdx/browser'
|
||||
import { h } from "vue";
|
||||
import HyperDX from '@hyperdx/browser';
|
||||
import EasySpeech from "easy-speech";
|
||||
import { checkUpdateNote } from "./UpdateNote";
|
||||
import { createDiscreteApi, NButton, NFlex, NText } from "naive-ui";
|
||||
import { apiFail, BASE_API_URL, isTauri } from "./constants";
|
||||
import { GetNotifactions } from "./notifactions";
|
||||
|
||||
let currentVersion: string
|
||||
let isHaveNewVersion = false
|
||||
|
||||
@@ -54,5 +54,10 @@ export default defineConfig({
|
||||
optimizeDeps: {
|
||||
include: ['@vicons/fluent', '@vicons/ionicons5', 'vue', 'vue-router']
|
||||
},
|
||||
build: { sourcemap: true },
|
||||
build: {
|
||||
sourcemap: true,
|
||||
rollupOptions: {
|
||||
external: ['naive-ui']
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user