mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 03:55:23 -04:00
!1007 fix xts abc size is empty
Merge pull request !1007 from zrg/fix_xts_abc
This commit is contained in:
@@ -797,8 +797,10 @@ function filterIntermediateJsBundleByHashJson(buildPath: string, inputPaths: Fil
|
||||
if (jsonObject[cacheOutputPath] === hashInputContentData && jsonObject[cacheAbcFilePath] === hashAbcContentData) {
|
||||
updateJsonObject[cacheOutputPath] = hashInputContentData;
|
||||
updateJsonObject[cacheAbcFilePath] = hashAbcContentData;
|
||||
mkdirsSync(path.dirname(abcPath));
|
||||
fs.copyFileSync(cacheAbcFilePath, abcPath);
|
||||
if (!fs.existsSync(abcPath)) {
|
||||
mkdirsSync(path.dirname(abcPath));
|
||||
fs.copyFileSync(cacheAbcFilePath, abcPath);
|
||||
}
|
||||
} else {
|
||||
fileterIntermediateJsBundle.push(inputPaths[i]);
|
||||
}
|
||||
@@ -835,8 +837,13 @@ function writeHashJson(): void {
|
||||
process.exitCode = FAIL;
|
||||
break;
|
||||
}
|
||||
mkdirsSync(path.dirname(abcFile));
|
||||
fs.copyFileSync(cacheAbcFilePath, abcFile);
|
||||
if (!fs.existsSync(abcFile)) {
|
||||
mkdirsSync(path.dirname(abcFile));
|
||||
fs.copyFileSync(cacheAbcFilePath, abcFile);
|
||||
}
|
||||
if (fs.existsSync(intermediateJsBundle[i].path)) {
|
||||
fs.unlinkSync(intermediateJsBundle[i].path);
|
||||
}
|
||||
}
|
||||
const hashFilePath: string = genHashJsonPath(buildPathInfo);
|
||||
if (hashFilePath.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user