!1 import npm包未收集ets范式

Merge pull request !1 from houhaoyu/houhaoyu2
This commit is contained in:
openharmony_ci
2022-09-21 09:01:50 +00:00
committed by Gitee
+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);
}