mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 09:03:53 +00:00
16 lines
360 B
TypeScript
16 lines
360 B
TypeScript
import { addServerHandler, createResolver, defineNuxtModule } 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'
|
|
})
|
|
}
|
|
})
|