add some fils

This commit is contained in:
Arina Yakovenko 2024-07-08 12:10:57 +02:00
parent abb43e054e
commit d1ee2539a9
2 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@
import { import {
defineNuxtModule, defineNuxtModule,
createResolver, createResolver,
addComponentsDir, addComponent,
} from "@nuxt/kit"; } from "@nuxt/kit";
export interface ModuleOptions {} export interface ModuleOptions {}
@ -16,8 +16,9 @@ export default defineNuxtModule<ModuleOptions>({
setup(_options, _nuxt) { setup(_options, _nuxt) {
const resolver = createResolver(import.meta.url); const resolver = createResolver(import.meta.url);
addComponentsDir({ addComponent({
path: resolver.resolve("../src/components/Ml/Button"), name: 'MlButton',
filePath: resolver.resolve('../src/components/Ml/Button/MlButton.vue')
}); });
}, },
}); });

View File

@ -1,6 +1,6 @@
{ {
"name": "nuxt3-reusable-components", "name": "nuxt3-reusable-components",
"version": "1.2.2", "version": "1.2.3",
"private": false, "private": false,
"type": "module", "type": "module",
"main": "index.js", "main": "index.js",