Skip to content

Commit f80805c

Browse files
authored
Merge pull request #1 from sanduluca/resurces-bundle
fixed: Duplicate resources on build release
2 parents 777e202 + d21c2c6 commit f80805c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/generateBundledResourcesHash.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ function addJsBundleAndMetaToManifest() {
7878
console.log(finalHash);
7979

8080
var savedResourcesManifestPath = assetsDir + "/" + CODE_PUSH_HASH_FILE_NAME;
81+
if (fs.existsSync(savedResourcesManifestPath)) {
82+
fs.unlinkSync(savedResourcesManifestPath);
83+
}
8184
fs.writeFileSync(savedResourcesManifestPath, finalHash);
8285

8386
// "CodePushHash.json" file name breaks flow type checking.
@@ -122,4 +125,4 @@ function fileExists(file) {
122125

123126
if (tempFileLocalPath) {
124127
fs.unlinkSync(tempFileLocalPath);
125-
}
128+
}

0 commit comments

Comments
 (0)