From 160ee30aa42092a9da24ff79d07a4f634d711a34 Mon Sep 17 00:00:00 2001 From: lizhouze Date: Fri, 24 Jun 2022 15:54:47 +0800 Subject: [PATCH] lizhouze@huawei.com Signed-off-by: lizhouze --- BUILD.gn | 1 + ace-loader/main.product.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 058030b..1819dfa 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -139,6 +139,7 @@ ohos_copy("ace_loader_ark_hap") { ":ace_loader", ":ace_loader_ark", ":build_ace_loader_library", + "//developtools/ace-ets2bundle:common_api_ark", ] sources = [ ace_loader_lib_dir ] outputs = [ ace_loader_ark_dir + "/lib" ] diff --git a/ace-loader/main.product.js b/ace-loader/main.product.js index aeaae3d..918b8e4 100644 --- a/ace-loader/main.product.js +++ b/ace-loader/main.product.js @@ -21,6 +21,14 @@ const md5 = require('md5'); const red = '\u001b[31m'; const reset = '\u001b[39m'; const multiResourceBuild = {}; +const systemModules = []; + +;(function readSystemModules() { + const systemModulesPath = path.resolve(__dirname,'../../api'); + if (fs.existsSync(systemModulesPath)) { + systemModules.push(...fs.readdirSync(systemModulesPath)); + } +})(); function deleteFolderRecursive(url) { let files = []; @@ -216,5 +224,6 @@ module.exports = { checkMultiResourceBuild: checkMultiResourceBuild, multiResourceBuild: multiResourceBuild, readWorkerFile: readWorkerFile, - compareCache: compareCache + compareCache: compareCache, + systemModules: systemModules }; \ No newline at end of file