From c96bf6048e6bbcea64eaf466bfa85bc077341dad Mon Sep 17 00:00:00 2001 From: Saeid Zareie <65568529+Saeid-Za@users.noreply.github.com> Date: Thu, 6 Feb 2025 23:55:59 +0330 Subject: [PATCH] fix: adding meta to middleware key --- packages/nuxt/src/pages/utils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nuxt/src/pages/utils.ts b/packages/nuxt/src/pages/utils.ts index 71833d881d..f9ca24cc7d 100644 --- a/packages/nuxt/src/pages/utils.ts +++ b/packages/nuxt/src/pages/utils.ts @@ -255,6 +255,10 @@ export async function getRouteMeta (contents: string, absolutePath: string, extr if (!property) { continue } const propertyValue = withLocations(property.value) + + if (key === 'middleware') { + dynamicProperties.add('meta') + } if (propertyValue.type === 'ObjectExpression') { const valueString = js.code.slice(propertyValue.start, propertyValue.end)