24 lines
457 B
TypeScript
24 lines
457 B
TypeScript
// modules/my-module.ts
|
|
import {
|
|
defineNuxtModule,
|
|
createResolver,
|
|
addComponentsDir,
|
|
} 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);
|
|
|
|
addComponentsDir({
|
|
path: resolver.resolve("../src/components/Ml/Button"),
|
|
});
|
|
},
|
|
});
|