fix: adding meta to middleware key

This commit is contained in:
Saeid Zareie 2025-02-06 23:55:59 +03:30 committed by GitHub
parent 203c6b14ff
commit c96bf6048e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)