mirror of https://github.com/status-im/metro.git
packager: TransformCache: do not include basename in hash
Reviewed By: cpojer Differential Revision: D4867411 fbshipit-source-id: ece5214ee9cf152e23790c70f7a8b12060725150
This commit is contained in:
parent
a42fd8c16b
commit
2c0a79383b
|
@ -83,7 +83,7 @@ function getCacheFilePaths(props: {
|
||||||
.update(props.transformOptionsKey);
|
.update(props.transformOptionsKey);
|
||||||
const hash = hasher.digest('hex');
|
const hash = hasher.digest('hex');
|
||||||
const prefix = hash.substr(0, 2);
|
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);
|
const base = path.join(getCacheDirPath(), prefix, fileName);
|
||||||
return {transformedCode: base, metadata: base + '.meta'};
|
return {transformedCode: base, metadata: base + '.meta'};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue