2024-07-08 09:15:33 +00:00
|
|
|
// modules/my-module.ts
|
|
|
|
import {
|
|
|
|
defineNuxtModule,
|
|
|
|
createResolver,
|
2024-07-08 10:10:57 +00:00
|
|
|
addComponent,
|
2024-07-08 09:15:33 +00:00
|
|
|
} 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);
|
|
|
|
|
2024-07-08 10:10:57 +00:00
|
|
|
addComponent({
|
|
|
|
name: 'MlButton',
|
|
|
|
filePath: resolver.resolve('../src/components/Ml/Button/MlButton.vue')
|
2024-07-08 09:15:33 +00:00
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|