From 2c0a79383b90b102c1bac2127d83c49dc6430dd2 Mon Sep 17 00:00:00 2001 From: Jean Lauliac Date: Tue, 11 Apr 2017 05:23:33 -0700 Subject: [PATCH] packager: TransformCache: do not include basename in hash Reviewed By: cpojer Differential Revision: D4867411 fbshipit-source-id: ece5214ee9cf152e23790c70f7a8b12060725150 --- packages/metro-bundler/src/lib/TransformCache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/metro-bundler/src/lib/TransformCache.js b/packages/metro-bundler/src/lib/TransformCache.js index 1e5ac907..5f164ca1 100644 --- a/packages/metro-bundler/src/lib/TransformCache.js +++ b/packages/metro-bundler/src/lib/TransformCache.js @@ -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'}; }