packager: Bundler: hash all the cache key components

Reviewed By: davidaurelio

Differential Revision: D4238061

fbshipit-source-id: 2ad79a85a5da3026afd508557b3b29457f472bb2
This commit is contained in:
Jean Lauliac 2016-11-30 07:35:50 -08:00 committed by Facebook Github Bot
parent 771e60235a
commit 937dc7ca17
1 changed files with 4 additions and 1 deletions

View File

@ -179,7 +179,10 @@ class Bundler {
} }
} }
const transformCacheKey = cacheKeyParts.join('$'); const transformCacheKey = crypto.createHash('sha1').update(
cacheKeyParts.join('$'),
).digest('hex');
this._cache = new Cache({ this._cache = new Cache({
resetCache: opts.resetCache, resetCache: opts.resetCache,
cacheKey: transformCacheKey, cacheKey: transformCacheKey,