diff --git a/app.vue b/app.vue deleted file mode 100644 index 90246ac..0000000 --- a/app.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/module.ts b/modules/module.ts index e009ee1..8317739 100644 --- a/modules/module.ts +++ b/modules/module.ts @@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, - addComponent, + addComponentsDir, } from "@nuxt/kit"; export interface ModuleOptions {} @@ -16,9 +16,11 @@ export default defineNuxtModule({ setup(_options, _nuxt) { const resolver = createResolver(import.meta.url); - addComponent({ - name: 'MlButton', - filePath: resolver.resolve('../src/components/Ml/Button/MlButton.vue') + addComponentsDir({ + path: resolver.resolve("../src/components/Ml"), + }); + addComponentsDir({ + path: resolver.resolve("../src/composables"), }); }, }); diff --git a/nuxt.config.ts b/nuxt.config.ts index db146d2..604f091 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,7 +1,7 @@ // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ - css: ["~/assets/css/main.css"], - modules: ["@nuxtjs/tailwindcss", "@nuxtjs/color-mode", "~/modules/module"], + css: ["./assets/css/main.css"], + modules: ["@nuxtjs/tailwindcss", "@nuxtjs/color-mode", "./modules/module.ts"], compatibilityDate: "2024-04-03", devtools: { enabled: true }, colorMode: {}, diff --git a/package.json b/package.json index d4442d2..643c573 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxt3-reusable-components", - "version": "1.2.3", + "version": "1.2.4", "private": false, "type": "module", "main": "index.js",