From fbe6b36136896a2ebaf139f90e6b2c0e2ea7f83c Mon Sep 17 00:00:00 2001 From: byronogis Date: Mon, 9 Dec 2024 02:54:13 +0800 Subject: [PATCH] chore(nuxt): avoid input `false` --- packages/nuxt-module/src/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nuxt-module/src/module.ts b/packages/nuxt-module/src/module.ts index 25072907c..b6ea4cf3b 100644 --- a/packages/nuxt-module/src/module.ts +++ b/packages/nuxt-module/src/module.ts @@ -117,7 +117,7 @@ export { styles, stylesToTop, themes }; import { defineNuxtPlugin, useRuntimeConfig } from '#imports'; ${registered.config.map((config: MetaType) => `import ${config.as} from '${config.from}';`).join('\n')} ${registered.services.map((service: MetaType) => `import ${service.as} from '${service.from}';`).join('\n')} -${autoImport && registered.directives.map((directive: MetaType) => `import ${directive.as} from '${directive.from}';`).join('\n')} +${autoImport ? registered.directives.map((directive: MetaType) => `import ${directive.as} from '${directive.from}';`).join('\n') : ''} ${importPT ? `import ${importPT.as} from '${normalize(importPT.from)}';\n` : ''} ${hasTheme && importTheme ? `import ${importTheme.as} from '${normalize(importTheme.from)}';\n` : ''} @@ -130,7 +130,7 @@ export default defineNuxtPlugin(({ vueApp }) => { usePrimeVue && vueApp.use(PrimeVue, { ...options, ...pt, ...theme }); ${registered.services.map((service: MetaType) => `vueApp.use(${service.as});`).join('\n')} - ${autoImport && registered.directives.map((directive: MetaType) => `vueApp.directive('${directive.name}', ${directive.as});`).join('\n')} + ${autoImport ? registered.directives.map((directive: MetaType) => `vueApp.directive('${directive.name}', ${directive.as});`).join('\n') : ''} }); `; }