mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(cli): 组件配置json key支持使用字符串常量
This commit is contained in:
parent
5927b394a7
commit
a8f8f488ad
@ -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)),
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user