Nuxt/test/fixtures/basic/modules/auto-registered/index.ts

16 lines
360 B
TypeScript
Raw Normal View History

import { createResolver, defineNuxtModule, addServerHandler } from 'nuxt/kit'
export default defineNuxtModule({
meta: {
name: 'auto-registered-module'
},
setup () {
const resolver = createResolver(import.meta.url)
addServerHandler({
handler: resolver.resolve('./runtime/handler'),
route: '/auto-registered-module'
})
}
})