mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
16 lines
360 B
TypeScript
16 lines
360 B
TypeScript
|
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'
|
||
|
})
|
||
|
}
|
||
|
})
|