fix(compiler-sfc): handle type modifier in import specifiers (#5498)

This commit is contained in:
木杉
2022-04-14 10:10:26 +08:00
committed by GitHub
parent cc238cdb8e
commit 8e29ef6019
3 changed files with 33 additions and 2 deletions

View File

@@ -802,7 +802,9 @@ export function compileScript(
node.source.value,
specifier.local.name,
imported,
node.importKind === 'type',
node.importKind === 'type' ||
(specifier.type === 'ImportSpecifier' &&
specifier.importKind === 'type'),
false
)
}
@@ -979,7 +981,9 @@ export function compileScript(
source,
local,
imported,
node.importKind === 'type',
node.importKind === 'type' ||
(specifier.type === 'ImportSpecifier' &&
specifier.importKind === 'type'),
true
)
}