fix(nuxt): preserve (re)named imports in meta (#19192)

This commit is contained in:
Daniel Roe 2023-02-21 12:22:12 +00:00 committed by GitHub
parent d2481f9675
commit c4eb4b784c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,7 @@ export const PageMetaPlugin = createUnplugin((options: PageMetaPluginOptions) =>
const parsed = parseStaticImport(i)
for (const name of [
parsed.defaultImport,
...Object.keys(parsed.namedImports || {}),
...Object.values(parsed.namedImports || {}),
parsed.namespacedImport
].filter(Boolean) as string[]) {
importMap.set(name, i)