fix(kit): use `route` instead of `path` in `ServerMiddleware` (#4139)

This commit is contained in:
Ahad Birang 2022-04-07 13:32:28 +02:00 committed by GitHub
parent cc9714ff40
commit f0714d78b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import type { Middleware } from 'h3'
import { useNuxt } from './context'
export interface ServerMiddleware {
path?: string,
route?: string,
handler: Middleware | string
}

View File

@ -22,7 +22,7 @@ export function viteNodePlugin (ctx: ViteBuildContext): VitePlugin {
export function registerViteNodeMiddleware (ctx: ViteBuildContext) {
addServerMiddleware({
route: '/__nuxt_vite_node__/',
handle: createViteNodeMiddleware(ctx)
handler: createViteNodeMiddleware(ctx)
})
}