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