library_components/modules/module.ts
2024-07-08 12:10:57 +02:00

25 lines
489 B
TypeScript

// modules/my-module.ts
import {
defineNuxtModule,
createResolver,
addComponent,
} from "@nuxt/kit";
export interface ModuleOptions {}
export default defineNuxtModule<ModuleOptions>({
meta: {
name: "module",
configKey: "myModule",
},
defaults: {},
setup(_options, _nuxt) {
const resolver = createResolver(import.meta.url);
addComponent({
name: 'MlButton',
filePath: resolver.resolve('../src/components/Ml/Button/MlButton.vue')
});
},
});