diff --git a/modules/module.ts b/modules/module.ts index 351159c..e009ee1 100644 --- a/modules/module.ts +++ b/modules/module.ts @@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, - addComponentsDir, + addComponent, } from "@nuxt/kit"; export interface ModuleOptions {} @@ -16,8 +16,9 @@ export default defineNuxtModule({ setup(_options, _nuxt) { const resolver = createResolver(import.meta.url); - addComponentsDir({ - path: resolver.resolve("../src/components/Ml/Button"), + addComponent({ + name: 'MlButton', + filePath: resolver.resolve('../src/components/Ml/Button/MlButton.vue') }); }, }); diff --git a/package.json b/package.json index 9fc344e..d4442d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxt3-reusable-components", - "version": "1.2.2", + "version": "1.2.3", "private": false, "type": "module", "main": "index.js",