Skip to content

Commit

Permalink
packager: Bundler: hash all the cache key components
Browse files Browse the repository at this point in the history
Reviewed By: davidaurelio

Differential Revision: D4238061

fbshipit-source-id: 2ad79a85a5da3026afd508557b3b29457f472bb2
  • Loading branch information
Jean Lauliac authored and Facebook Github Bot committed Nov 30, 2016
1 parent 6554ad5 commit 6740207
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packager/react-packager/src/Bundler/index.js
Expand Up @@ -179,7 +179,10 @@ class Bundler {
}
}

const transformCacheKey = cacheKeyParts.join('$');
const transformCacheKey = crypto.createHash('sha1').update(
cacheKeyParts.join('$'),
).digest('hex');

this._cache = new Cache({
resetCache: opts.resetCache,
cacheKey: transformCacheKey,
Expand Down

0 comments on commit 6740207

Please sign in to comment.