fix(cli): 组件配置json key支持使用字符串常量

This commit is contained in:
roymondchen 2023-08-09 16:09:26 +08:00
parent 5927b394a7
commit a8f8f488ad

View File

@ -311,7 +311,7 @@ const getComponentPackageImports = function ({
if (propertyMatch) {
result.imports.push({
type: property.key.name,
type: property.key.name ?? property.key.value,
name: propertyMatch.specifiers[0].local.name,
indexPath: getIndexPath(path.resolve(path.dirname(indexPath), propertyMatch.source.value)),
});