mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-09 18:26:54 +08:00
fix(cli): entry生成路径错误问题
This commit is contained in:
parent
04e18572fd
commit
f5a8d6bdc6
@ -419,10 +419,11 @@ const getASTTokenByTraverse = ({ ast, indexPath }: { ast: any; indexPath: string
|
||||
});
|
||||
|
||||
Object.keys(exportSpecifiersMap).forEach((exportName) => {
|
||||
const filePath = path.resolve(
|
||||
path.dirname(indexPath),
|
||||
exportSpecifiersMap[exportName] || importSpecifiersMap[exportName] || '',
|
||||
);
|
||||
const exportValue = exportSpecifiersMap[exportName];
|
||||
const importValue = importSpecifiersMap[exportName];
|
||||
const connectValue = exportValue ? importSpecifiersMap[exportValue] : '';
|
||||
const filePath = path.resolve(path.dirname(indexPath), connectValue || importValue || exportValue || '');
|
||||
|
||||
if (exportName === EntryType.VALUE) {
|
||||
value = filePath;
|
||||
} else if (exportName === EntryType.CONFIG) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user