diff --git a/AGENTS.md b/AGENTS.md index 6e2a4fa..9fe2513 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ Multiple auto-import systems are active: - **Vue APIs**: Core Vue, VueUse, Pinia, Vue Router, vue-i18n - **Components**: Auto-registered from multiple UI libraries (Naive UI, PrimeVue) -- **Icons**: Uses `unplugin-icons` with `icon-` prefix; custom SVGs from `src/assets/icons/svgs/` available via `icon-svg:filename` +- **Icons**: Uses `unplugin-icons` with `icon-` prefix; custom SVGs from `src/assets/icons/svgs/` available via `icon-svg-filename` **IMPORTANT - Auto-Import Limitations**: diff --git a/auto-imports.d.ts b/auto-imports.d.ts index d2bef15..d9d86f1 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -8,160 +8,6 @@ export {} declare global { const APP_THEME_MODES: typeof import('./src/stores/app-store')['APP_THEME_MODES'] const EffectScope: typeof import('vue')['EffectScope'] - const NA: typeof import('naive-ui')['NA'] - const NAffix: typeof import('naive-ui')['NAffix'] - const NAlert: typeof import('naive-ui')['NAlert'] - const NAnchor: typeof import('naive-ui')['NAnchor'] - const NAnchorLink: typeof import('naive-ui')['NAnchorLink'] - const NAutoComplete: typeof import('naive-ui')['NAutoComplete'] - const NAvatar: typeof import('naive-ui')['NAvatar'] - const NAvatarGroup: typeof import('naive-ui')['NAvatarGroup'] - const NBackTop: typeof import('naive-ui')['NBackTop'] - const NBadge: typeof import('naive-ui')['NBadge'] - const NBlockquote: typeof import('naive-ui')['NBlockquote'] - const NBreadcrumb: typeof import('naive-ui')['NBreadcrumb'] - const NBreadcrumbItem: typeof import('naive-ui')['NBreadcrumbItem'] - const NButton: typeof import('naive-ui')['NButton'] - const NButtonGroup: typeof import('naive-ui')['NButtonGroup'] - const NCalendar: typeof import('naive-ui')['NCalendar'] - const NCard: typeof import('naive-ui')['NCard'] - const NCarousel: typeof import('naive-ui')['NCarousel'] - const NCarouselItem: typeof import('naive-ui')['NCarouselItem'] - const NCascader: typeof import('naive-ui')['NCascader'] - const NCheckbox: typeof import('naive-ui')['NCheckbox'] - const NCheckboxGroup: typeof import('naive-ui')['NCheckboxGroup'] - const NCode: typeof import('naive-ui')['NCode'] - const NCol: typeof import('naive-ui')['NCol'] - const NCollapse: typeof import('naive-ui')['NCollapse'] - const NCollapseItem: typeof import('naive-ui')['NCollapseItem'] - const NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] - const NColorPicker: typeof import('naive-ui')['NColorPicker'] - const NConfigProvider: typeof import('naive-ui')['NConfigProvider'] - const NCountdown: typeof import('naive-ui')['NCountdown'] - const NDataTable: typeof import('naive-ui')['NDataTable'] - const NDatePicker: typeof import('naive-ui')['NDatePicker'] - const NDescriptions: typeof import('naive-ui')['NDescriptions'] - const NDescriptionsItem: typeof import('naive-ui')['NDescriptionsItem'] - const NDialog: typeof import('naive-ui')['NDialog'] - const NDialogProvider: typeof import('naive-ui')['NDialogProvider'] - const NDivider: typeof import('naive-ui')['NDivider'] - const NDrawer: typeof import('naive-ui')['NDrawer'] - const NDrawerContent: typeof import('naive-ui')['NDrawerContent'] - const NDropdown: typeof import('naive-ui')['NDropdown'] - const NDynamicInput: typeof import('naive-ui')['NDynamicInput'] - const NDynamicTags: typeof import('naive-ui')['NDynamicTags'] - const NEl: typeof import('naive-ui')['NEl'] - const NElement: typeof import('naive-ui')['NElement'] - const NEllipsis: typeof import('naive-ui')['NEllipsis'] - const NEmpty: typeof import('naive-ui')['NEmpty'] - const NEquation: typeof import('naive-ui')['NEquation'] - const NFlex: typeof import('naive-ui')['NFlex'] - const NFloatButton: typeof import('naive-ui')['NFloatButton'] - const NFloatButtonGroup: typeof import('naive-ui')['NFloatButtonGroup'] - const NForm: typeof import('naive-ui')['NForm'] - const NFormItem: typeof import('naive-ui')['NFormItem'] - const NFormItemCol: typeof import('naive-ui')['NFormItemCol'] - const NFormItemGi: typeof import('naive-ui')['NFormItemGi'] - const NFormItemGridItem: typeof import('naive-ui')['NFormItemGridItem'] - const NFormItemRow: typeof import('naive-ui')['NFormItemRow'] - const NGi: typeof import('naive-ui')['NGi'] - const NGlobalStyle: typeof import('naive-ui')['NGlobalStyle'] - const NGradientText: typeof import('naive-ui')['NGradientText'] - const NGrid: typeof import('naive-ui')['NGrid'] - const NGridItem: typeof import('naive-ui')['NGridItem'] - const NH1: typeof import('naive-ui')['NH1'] - const NH2: typeof import('naive-ui')['NH2'] - const NH3: typeof import('naive-ui')['NH3'] - const NH4: typeof import('naive-ui')['NH4'] - const NH5: typeof import('naive-ui')['NH5'] - const NH6: typeof import('naive-ui')['NH6'] - const NHeatmap: typeof import('naive-ui')['NHeatmap'] - const NHighlight: typeof import('naive-ui')['NHighlight'] - const NHr: typeof import('naive-ui')['NHr'] - const NIcon: typeof import('naive-ui')['NIcon'] - const NIconWrapper: typeof import('naive-ui')['NIconWrapper'] - const NImage: typeof import('naive-ui')['NImage'] - const NImageGroup: typeof import('naive-ui')['NImageGroup'] - const NImagePreview: typeof import('naive-ui')['NImagePreview'] - const NInfiniteScroll: typeof import('naive-ui')['NInfiniteScroll'] - const NInput: typeof import('naive-ui')['NInput'] - const NInputGroup: typeof import('naive-ui')['NInputGroup'] - const NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel'] - const NInputNumber: typeof import('naive-ui')['NInputNumber'] - const NInputOtp: typeof import('naive-ui')['NInputOtp'] - const NLayout: typeof import('naive-ui')['NLayout'] - const NLayoutContent: typeof import('naive-ui')['NLayoutContent'] - const NLayoutFooter: typeof import('naive-ui')['NLayoutFooter'] - const NLayoutHeader: typeof import('naive-ui')['NLayoutHeader'] - const NLayoutSider: typeof import('naive-ui')['NLayoutSider'] - const NLegacyTransfer: typeof import('naive-ui')['NLegacyTransfer'] - const NLi: typeof import('naive-ui')['NLi'] - const NList: typeof import('naive-ui')['NList'] - const NListItem: typeof import('naive-ui')['NListItem'] - const NLoadingBarProvider: typeof import('naive-ui')['NLoadingBarProvider'] - const NLog: typeof import('naive-ui')['NLog'] - const NMarquee: typeof import('naive-ui')['NMarquee'] - const NMention: typeof import('naive-ui')['NMention'] - const NMenu: typeof import('naive-ui')['NMenu'] - const NMessageProvider: typeof import('naive-ui')['NMessageProvider'] - const NModal: typeof import('naive-ui')['NModal'] - const NModalProvider: typeof import('naive-ui')['NModalProvider'] - const NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] - const NNumberAnimation: typeof import('naive-ui')['NNumberAnimation'] - const NOl: typeof import('naive-ui')['NOl'] - const NP: typeof import('naive-ui')['NP'] - const NPageHeader: typeof import('naive-ui')['NPageHeader'] - const NPagination: typeof import('naive-ui')['NPagination'] - const NPerformantEllipsis: typeof import('naive-ui')['NPerformantEllipsis'] - const NPopconfirm: typeof import('naive-ui')['NPopconfirm'] - const NPopover: typeof import('naive-ui')['NPopover'] - const NPopselect: typeof import('naive-ui')['NPopselect'] - const NProgress: typeof import('naive-ui')['NProgress'] - const NQrCode: typeof import('naive-ui')['NQrCode'] - const NRadio: typeof import('naive-ui')['NRadio'] - const NRadioButton: typeof import('naive-ui')['NRadioButton'] - const NRadioGroup: typeof import('naive-ui')['NRadioGroup'] - const NRate: typeof import('naive-ui')['NRate'] - const NResult: typeof import('naive-ui')['NResult'] - const NRow: typeof import('naive-ui')['NRow'] - const NScrollbar: typeof import('naive-ui')['NScrollbar'] - const NSelect: typeof import('naive-ui')['NSelect'] - const NSkeleton: typeof import('naive-ui')['NSkeleton'] - const NSlider: typeof import('naive-ui')['NSlider'] - const NSpace: typeof import('naive-ui')['NSpace'] - const NSpin: typeof import('naive-ui')['NSpin'] - const NSplit: typeof import('naive-ui')['NSplit'] - const NStatistic: typeof import('naive-ui')['NStatistic'] - const NStep: typeof import('naive-ui')['NStep'] - const NSteps: typeof import('naive-ui')['NSteps'] - const NSwitch: typeof import('naive-ui')['NSwitch'] - const NTab: typeof import('naive-ui')['NTab'] - const NTabPane: typeof import('naive-ui')['NTabPane'] - const NTable: typeof import('naive-ui')['NTable'] - const NTabs: typeof import('naive-ui')['NTabs'] - const NTag: typeof import('naive-ui')['NTag'] - const NTbody: typeof import('naive-ui')['NTbody'] - const NTd: typeof import('naive-ui')['NTd'] - const NText: typeof import('naive-ui')['NText'] - const NTh: typeof import('naive-ui')['NTh'] - const NThead: typeof import('naive-ui')['NThead'] - const NThing: typeof import('naive-ui')['NThing'] - const NTime: typeof import('naive-ui')['NTime'] - const NTimePicker: typeof import('naive-ui')['NTimePicker'] - const NTimeline: typeof import('naive-ui')['NTimeline'] - const NTimelineItem: typeof import('naive-ui')['NTimelineItem'] - const NTooltip: typeof import('naive-ui')['NTooltip'] - const NTr: typeof import('naive-ui')['NTr'] - const NTransfer: typeof import('naive-ui')['NTransfer'] - const NTree: typeof import('naive-ui')['NTree'] - const NTreeSelect: typeof import('naive-ui')['NTreeSelect'] - const NUl: typeof import('naive-ui')['NUl'] - const NUpload: typeof import('naive-ui')['NUpload'] - const NUploadDragger: typeof import('naive-ui')['NUploadDragger'] - const NUploadFileList: typeof import('naive-ui')['NUploadFileList'] - const NUploadTrigger: typeof import('naive-ui')['NUploadTrigger'] - const NVirtualList: typeof import('naive-ui')['NVirtualList'] - const NWatermark: typeof import('naive-ui')['NWatermark'] const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] const arrayToTree: typeof import('utils4u/array')['arrayToTree'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] @@ -500,160 +346,6 @@ declare module 'vue' { interface ComponentCustomProperties { readonly APP_THEME_MODES: UnwrapRef readonly EffectScope: UnwrapRef - readonly NA: UnwrapRef - readonly NAffix: UnwrapRef - readonly NAlert: UnwrapRef - readonly NAnchor: UnwrapRef - readonly NAnchorLink: UnwrapRef - readonly NAutoComplete: UnwrapRef - readonly NAvatar: UnwrapRef - readonly NAvatarGroup: UnwrapRef - readonly NBackTop: UnwrapRef - readonly NBadge: UnwrapRef - readonly NBlockquote: UnwrapRef - readonly NBreadcrumb: UnwrapRef - readonly NBreadcrumbItem: UnwrapRef - readonly NButton: UnwrapRef - readonly NButtonGroup: UnwrapRef - readonly NCalendar: UnwrapRef - readonly NCard: UnwrapRef - readonly NCarousel: UnwrapRef - readonly NCarouselItem: UnwrapRef - readonly NCascader: UnwrapRef - readonly NCheckbox: UnwrapRef - readonly NCheckboxGroup: UnwrapRef - readonly NCode: UnwrapRef - readonly NCol: UnwrapRef - readonly NCollapse: UnwrapRef - readonly NCollapseItem: UnwrapRef - readonly NCollapseTransition: UnwrapRef - readonly NColorPicker: UnwrapRef - readonly NConfigProvider: UnwrapRef - readonly NCountdown: UnwrapRef - readonly NDataTable: UnwrapRef - readonly NDatePicker: UnwrapRef - readonly NDescriptions: UnwrapRef - readonly NDescriptionsItem: UnwrapRef - readonly NDialog: UnwrapRef - readonly NDialogProvider: UnwrapRef - readonly NDivider: UnwrapRef - readonly NDrawer: UnwrapRef - readonly NDrawerContent: UnwrapRef - readonly NDropdown: UnwrapRef - readonly NDynamicInput: UnwrapRef - readonly NDynamicTags: UnwrapRef - readonly NEl: UnwrapRef - readonly NElement: UnwrapRef - readonly NEllipsis: UnwrapRef - readonly NEmpty: UnwrapRef - readonly NEquation: UnwrapRef - readonly NFlex: UnwrapRef - readonly NFloatButton: UnwrapRef - readonly NFloatButtonGroup: UnwrapRef - readonly NForm: UnwrapRef - readonly NFormItem: UnwrapRef - readonly NFormItemCol: UnwrapRef - readonly NFormItemGi: UnwrapRef - readonly NFormItemGridItem: UnwrapRef - readonly NFormItemRow: UnwrapRef - readonly NGi: UnwrapRef - readonly NGlobalStyle: UnwrapRef - readonly NGradientText: UnwrapRef - readonly NGrid: UnwrapRef - readonly NGridItem: UnwrapRef - readonly NH1: UnwrapRef - readonly NH2: UnwrapRef - readonly NH3: UnwrapRef - readonly NH4: UnwrapRef - readonly NH5: UnwrapRef - readonly NH6: UnwrapRef - readonly NHeatmap: UnwrapRef - readonly NHighlight: UnwrapRef - readonly NHr: UnwrapRef - readonly NIcon: UnwrapRef - readonly NIconWrapper: UnwrapRef - readonly NImage: UnwrapRef - readonly NImageGroup: UnwrapRef - readonly NImagePreview: UnwrapRef - readonly NInfiniteScroll: UnwrapRef - readonly NInput: UnwrapRef - readonly NInputGroup: UnwrapRef - readonly NInputGroupLabel: UnwrapRef - readonly NInputNumber: UnwrapRef - readonly NInputOtp: UnwrapRef - readonly NLayout: UnwrapRef - readonly NLayoutContent: UnwrapRef - readonly NLayoutFooter: UnwrapRef - readonly NLayoutHeader: UnwrapRef - readonly NLayoutSider: UnwrapRef - readonly NLegacyTransfer: UnwrapRef - readonly NLi: UnwrapRef - readonly NList: UnwrapRef - readonly NListItem: UnwrapRef - readonly NLoadingBarProvider: UnwrapRef - readonly NLog: UnwrapRef - readonly NMarquee: UnwrapRef - readonly NMention: UnwrapRef - readonly NMenu: UnwrapRef - readonly NMessageProvider: UnwrapRef - readonly NModal: UnwrapRef - readonly NModalProvider: UnwrapRef - readonly NNotificationProvider: UnwrapRef - readonly NNumberAnimation: UnwrapRef - readonly NOl: UnwrapRef - readonly NP: UnwrapRef - readonly NPageHeader: UnwrapRef - readonly NPagination: UnwrapRef - readonly NPerformantEllipsis: UnwrapRef - readonly NPopconfirm: UnwrapRef - readonly NPopover: UnwrapRef - readonly NPopselect: UnwrapRef - readonly NProgress: UnwrapRef - readonly NQrCode: UnwrapRef - readonly NRadio: UnwrapRef - readonly NRadioButton: UnwrapRef - readonly NRadioGroup: UnwrapRef - readonly NRate: UnwrapRef - readonly NResult: UnwrapRef - readonly NRow: UnwrapRef - readonly NScrollbar: UnwrapRef - readonly NSelect: UnwrapRef - readonly NSkeleton: UnwrapRef - readonly NSlider: UnwrapRef - readonly NSpace: UnwrapRef - readonly NSpin: UnwrapRef - readonly NSplit: UnwrapRef - readonly NStatistic: UnwrapRef - readonly NStep: UnwrapRef - readonly NSteps: UnwrapRef - readonly NSwitch: UnwrapRef - readonly NTab: UnwrapRef - readonly NTabPane: UnwrapRef - readonly NTable: UnwrapRef - readonly NTabs: UnwrapRef - readonly NTag: UnwrapRef - readonly NTbody: UnwrapRef - readonly NTd: UnwrapRef - readonly NText: UnwrapRef - readonly NTh: UnwrapRef - readonly NThead: UnwrapRef - readonly NThing: UnwrapRef - readonly NTime: UnwrapRef - readonly NTimePicker: UnwrapRef - readonly NTimeline: UnwrapRef - readonly NTimelineItem: UnwrapRef - readonly NTooltip: UnwrapRef - readonly NTr: UnwrapRef - readonly NTransfer: UnwrapRef - readonly NTree: UnwrapRef - readonly NTreeSelect: UnwrapRef - readonly NUl: UnwrapRef - readonly NUpload: UnwrapRef - readonly NUploadDragger: UnwrapRef - readonly NUploadFileList: UnwrapRef - readonly NUploadTrigger: UnwrapRef - readonly NVirtualList: UnwrapRef - readonly NWatermark: UnwrapRef readonly acceptHMRUpdate: UnwrapRef readonly arrayToTree: UnwrapRef readonly asyncComputed: UnwrapRef diff --git a/package.json b/package.json index ad165fb..7006dff 100644 --- a/package.json +++ b/package.json @@ -125,8 +125,8 @@ "unocss-preset-animations": "^1.2.1", "unplugin-auto-import": "^20.1.0", "unplugin-icons": "^22.2.0", - "unplugin-vue-components": "^29.0.0", - "unplugin-vue-markdown": "^29.1.0", + "unplugin-vue-components": "^29.2.0", + "unplugin-vue-markdown": "^29.2.0", "unplugin-vue-router": "^0.16.0", "vite": "^7.1.5", "vite-plugin-checker": "^0.11.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c45eadb..f14ffa5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -232,10 +232,10 @@ importers: specifier: ^22.2.0 version: 22.4.2(@vue/compiler-sfc@3.5.22) unplugin-vue-components: - specifier: ^29.0.0 - version: 29.1.0(@babel/parser@7.28.4)(vue@3.5.22(typescript@5.9.2)) + specifier: ^29.2.0 + version: 29.2.0(@babel/parser@7.28.4)(vue@3.5.22(typescript@5.9.2)) unplugin-vue-markdown: - specifier: ^29.1.0 + specifier: ^29.2.0 version: 29.2.0(vite@7.1.10(@types/node@22.18.11)(jiti@2.6.1)(lightningcss@1.30.1)(sass-embedded@1.93.2)(sass@1.93.2)(terser@5.44.0)(yaml@2.8.1)) unplugin-vue-router: specifier: ^0.16.0 @@ -5402,8 +5402,8 @@ packages: resolution: {integrity: sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==} engines: {node: '>=20.19.0'} - unplugin-vue-components@29.1.0: - resolution: {integrity: sha512-z/9ACPXth199s9aCTCdKZAhe5QGOpvzJYP+Hkd0GN1/PpAmsu+W3UlRY3BJAewPqQxh5xi56+Og6mfiCV1Jzpg==} + unplugin-vue-components@29.2.0: + resolution: {integrity: sha512-QxBeBdmEflgtJRgMQMc/z/JVV5lcwXN5nOy5ehX6CKDGylIu6Qn4Goy8X95S0qOxF7EdI+uNhdBd4v5i0bvzCw==} engines: {node: '>=14'} peerDependencies: '@babel/parser': ^7.15.8 @@ -11229,7 +11229,7 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-components@29.1.0(@babel/parser@7.28.4)(vue@3.5.22(typescript@5.9.2)): + unplugin-vue-components@29.2.0(@babel/parser@7.28.4)(vue@3.5.22(typescript@5.9.2)): dependencies: chokidar: 3.6.0 debug: 4.4.3 diff --git a/src/layouts/base-layout/base-layout-header/components/LanguageSwitchButton.vue b/src/layouts/base-layout/base-layout-header/components/LanguageSwitchButton.vue index 4ea655c..21624ff 100644 --- a/src/layouts/base-layout/base-layout-header/components/LanguageSwitchButton.vue +++ b/src/layouts/base-layout/base-layout-header/components/LanguageSwitchButton.vue @@ -25,7 +25,7 @@ function handleSelect(key: string) { {{ languageLabels[locale] }} diff --git a/src/layouts/base-layout/base-layout-header/components/ThemeSwitchButton.vue b/src/layouts/base-layout/base-layout-header/components/ThemeSwitchButton.vue index 84044de..216424d 100644 --- a/src/layouts/base-layout/base-layout-header/components/ThemeSwitchButton.vue +++ b/src/layouts/base-layout/base-layout-header/components/ThemeSwitchButton.vue @@ -13,17 +13,17 @@ const themeLabels: Record = { {{ themeLabels[appStore.themeMode] }} diff --git a/src/layouts/base-layout/base-layout-header/components/ToggleSiderButton.vue b/src/layouts/base-layout/base-layout-header/components/ToggleSiderButton.vue index d874851..b2e7087 100644 --- a/src/layouts/base-layout/base-layout-header/components/ToggleSiderButton.vue +++ b/src/layouts/base-layout/base-layout-header/components/ToggleSiderButton.vue @@ -15,8 +15,8 @@ function toggleCollapsed() { {{ appStore.sidebarCollapsed ? '展开菜单' : '收起菜单' }} diff --git a/vite-plugins/02.unplugin-auto-import.ts b/vite-plugins/02.unplugin-auto-import.ts index f35f55f..ff8090c 100644 --- a/vite-plugins/02.unplugin-auto-import.ts +++ b/vite-plugins/02.unplugin-auto-import.ts @@ -4,6 +4,7 @@ import path from 'node:path'; import AutoImport from 'unplugin-auto-import/vite'; import { FileSystemIconLoader } from 'unplugin-icons/loaders'; +import IconsResolver from 'unplugin-icons/resolver'; import Icons from 'unplugin-icons/vite'; import Components from 'unplugin-vue-components/vite'; import { VueRouterAutoImports } from 'unplugin-vue-router'; @@ -22,12 +23,12 @@ import { TDesignResolver } from 'unplugin-vue-components/resolvers'; import { PrimeVueResolver } from '@primevue/auto-import-resolver'; -import IconsResolver from 'unplugin-icons/resolver'; - import { VantResolver } from '@vant/auto-import-resolver'; // <<<<< function _getNaiveUiComponentNames() { + // [dtsTsx](https://github.com/unplugin/unplugin-vue-components/pull/673/files/84e80738885cfe11298f41f070cda94a7a779276) + // 方法1: 从 web-types.json 读取(推荐) const webTypesPath = path.resolve('node_modules/naive-ui/web-types.json'); if (fs.existsSync(webTypesPath)) { @@ -82,7 +83,7 @@ export function loadPlugin(_configEnv: ConfigEnv): PluginOption { 'useMessage', 'useNotification', 'useLoadingBar', - ..._getNaiveUiComponentNames(), + // ..._getNaiveUiComponentNames(), ], }, ], @@ -91,12 +92,25 @@ export function loadPlugin(_configEnv: ConfigEnv): PluginOption { // https://github.com/antfu/unplugin-vue-components Components({ syncMode: 'default', + dtsTsx: true, + // `__`开头的 excludeNames: [/^__/], // allow auto load markdown components under `./src/components/` extensions: ['vue', 'md'], - // allow auto import and register components used in markdown - include: [/\.vue$/, /\.vue\?vue/, /\.md$/], + + include: [ + // https://github.com/unplugin/unplugin-vue-components/blob/c9117ae93f60f81c8b5a41890cb7fa0133f34a12/src/core/unplugin.ts#L17 + + /\.vue$/, + /\.vue\?vue/, + /\.vue\.[tj]sx?\?vue/, // for vue-loader with experimentalInlineMatchResource enabled + /\.vue\?v=/, + // + /\.md$/, // allow auto import and register components used in markdown + /\.tsx/, + ], + resolvers: [ AntDesignVueResolver({ importStyle: false, // css in js