mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 17:07:22 +00:00
fix(nuxt3): support extending page metadata (#3603)
This commit is contained in:
parent
8c6af7da7a
commit
32cf973ab0
@ -236,7 +236,7 @@ export function normalizeRoutes (routes: NuxtPage[], metaImports: Set<string> =
|
||||
return {
|
||||
...Object.fromEntries(Object.entries(route).map(([key, value]) => [key, JSON.stringify(value)])),
|
||||
children: route.children ? normalizeRoutes(route.children, metaImports).routes : [],
|
||||
meta: route.meta ? JSON.stringify(route.meta) : metaImportName,
|
||||
meta: route.meta ? `{...(${metaImportName} || {}), ...${JSON.stringify(route.meta)}}` : metaImportName,
|
||||
component: genDynamicImport(file)
|
||||
}
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user