diff --git a/ace-loader/src/genAbc-plugin.js b/ace-loader/src/genAbc-plugin.js index c74e5a8d12eeb435065d2961e7918e64f3412762..358973c6d84f2fca4ff41c4fd5c634d1323382ff 100644 --- a/ace-loader/src/genAbc-plugin.js +++ b/ace-loader/src/genAbc-plugin.js @@ -63,6 +63,7 @@ const ES2ABC = 'es2abc'; const WINDOWS = 'Windows_NT'; const LINUX = 'Linux'; const MAC = 'Darwin'; +const HARMONYOS = 'HarmonyOS'; const FILESINFO_TXT = 'filesInfo.txt'; const manageBunldeWorkersScript = 'manage-bundle-workers.js'; const PREBUILDINFO_JSON = 'preBuildInfo.json'; @@ -528,10 +529,14 @@ export function isMacOs() { return os.type() === MAC; } +export function isHarmonyOs() { + return os.type() === HARMONYOS; +} + export function maxFilePathLength() { if (isWindows()) { return 32766; - } else if (isLinux()) { + } else if (isLinux() || isHarmonyOs()) { return 4095; } else if (isMacOs()) { return 1016;