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

@ -256,6 +256,10 @@ export async function getRouteMeta (contents: string, absolutePath: string, extr
const propertyValue = withLocations(property.value) const propertyValue = withLocations(property.value)
if (key === 'middleware') {
dynamicProperties.add('meta')
}
if (propertyValue.type === 'ObjectExpression') { if (propertyValue.type === 'ObjectExpression') {
const valueString = js.code.slice(propertyValue.start, propertyValue.end) const valueString = js.code.slice(propertyValue.start, propertyValue.end)
try { try {