packager: TransformCache: do not include basename in hash

Reviewed By: cpojer

Differential Revision: D4867411

fbshipit-source-id: ece5214ee9cf152e23790c70f7a8b12060725150
This commit is contained in:
Jean Lauliac 2017-04-11 05:23:33 -07:00 committed by Facebook Github Bot
parent a42fd8c16b
commit 2c0a79383b
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ function getCacheFilePaths(props: {
.update(props.transformOptionsKey);
const hash = hasher.digest('hex');
const prefix = hash.substr(0, 2);
const fileName = `${hash.substr(2)}${path.basename(props.filePath)}`;
const fileName = `${hash.substr(2)}`;
const base = path.join(getCacheDirPath(), prefix, fileName);
return {transformedCode: base, metadata: base + '.meta'};
}