From ff21e2a35486e150c6e01d6e8f7e95879b2acd2b Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Wed, 21 Sep 2022 15:05:26 +0800 Subject: [PATCH] houhaoyu@huawei.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm包未收集ets范式 Signed-off-by: houhaoyu Change-Id: I4617bb3e76553ab590a00c8fd0f93d9ab1be5111 --- compiler/src/process_import.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/src/process_import.ts b/compiler/src/process_import.ts index 7f4a930..b9d774d 100644 --- a/compiler/src/process_import.ts +++ b/compiler/src/process_import.ts @@ -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); } -- Gitee