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)