From 31aff977d383402ecc7c7dc7b5853e6cd6840688 Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Sun, 6 Oct 2024 11:29:24 +0100 Subject: [PATCH] Refactor #6007 --- packages/nuxt-module/src/module.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/nuxt-module/src/module.ts b/packages/nuxt-module/src/module.ts index ab2310608..9da1c2b79 100644 --- a/packages/nuxt-module/src/module.ts +++ b/packages/nuxt-module/src/module.ts @@ -1,4 +1,5 @@ import { addPlugin, addPluginTemplate, addTemplate, createResolver, defineNuxtModule } from '@nuxt/kit'; +import { isNotEmpty } from '@primeuix/utils'; import { PrimeVueResolver } from '@primevue/auto-import-resolver'; import type { MetaType } from '@primevue/metadata'; import { normalize } from 'pathe'; @@ -62,9 +63,11 @@ export default defineNuxtModule({ let registeredStyles: MetaType[] = registered.styles; if (autoImport) { + const dts = isNotEmpty(moduleOptions.components?.prefix) || isNotEmpty(moduleOptions.directives?.prefix); + Components( { - dts: true, + dts, resolvers: [ PrimeVueResolver({ components: moduleOptions.components,