From f0714d78b0618bbe0be8c077209301d501938185 Mon Sep 17 00:00:00 2001 From: Ahad Birang Date: Thu, 7 Apr 2022 13:32:28 +0200 Subject: [PATCH] fix(kit): use `route` instead of `path` in `ServerMiddleware` (#4139) --- packages/kit/src/server.ts | 2 +- packages/vite/src/vite-node.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) }) }