diff --git a/packages/kit/src/server.ts b/packages/kit/src/server.ts index f5720feee0..ce17bac29a 100644 --- a/packages/kit/src/server.ts +++ b/packages/kit/src/server.ts @@ -2,7 +2,7 @@ import type { Middleware } from 'h3' import { useNuxt } from './context' export interface ServerMiddleware { - path?: string, + route?: string, handler: Middleware | string } diff --git a/packages/vite/src/vite-node.ts b/packages/vite/src/vite-node.ts index f0e0daae30..85c5d59c68 100644 --- a/packages/vite/src/vite-node.ts +++ b/packages/vite/src/vite-node.ts @@ -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) }) }