npm包未收集ets范式

Signed-off-by: houhaoyu <houhaoyu@huawei.com>
Change-Id: I4617bb3e76553ab590a00c8fd0f93d9ab1be5111
This commit is contained in:
houhaoyu
2022-09-21 15:05:26 +08:00
parent 6ed0697070
commit 201e87a022
+3
View File
@@ -471,6 +471,9 @@ function getFileResolvePath(fileResolvePath: string, pagesDir: string, filePath:
fileResolvePath = fileResolvePath + EXTNAME_ETS;
} else if (isPackageJsonEntry(fileResolvePath)) {
fileResolvePath = getPackageJsonEntry(fileResolvePath);
if (fs.statSync(fileResolvePath).isDirectory() && fs.existsSync(path.join(fileResolvePath, INDEX_ETS))) {
fileResolvePath = path.join(fileResolvePath, INDEX_ETS);
}
} else if (fs.existsSync(path.join(fileResolvePath, INDEX_ETS))) {
fileResolvePath = path.join(fileResolvePath, INDEX_ETS);
}