diff --git a/compiler/main.js b/compiler/main.js index 21f1ff1..d09b36a 100644 --- a/compiler/main.js +++ b/compiler/main.js @@ -403,19 +403,17 @@ function checkAppResourcePath(appResourcePath, config) { } function saveAppResourcePath(appResourcePath, appResourcePathSavePath) { - if (!projectConfig.xtsMode) { - let isSave = false; - if (fs.existsSync(appResourcePathSavePath)) { - const saveContent = fs.readFileSync(appResourcePathSavePath); - if (appResourcePath !== saveContent) { - isSave = true; - } - } else { + let isSave = false; + if (fs.existsSync(appResourcePathSavePath)) { + const saveContent = fs.readFileSync(appResourcePathSavePath); + if (appResourcePath !== saveContent) { isSave = true; } - if (isSave) { - fs.writeFileSync(appResourcePathSavePath, appResourcePath); - } + } else { + isSave = true; + } + if (isSave) { + fs.writeFileSync(appResourcePathSavePath, appResourcePath); } }