Make the modification time of the transformer file relevant for the cache.
Reviewed By: amasad Differential Revision: D2554956 fb-gh-sync-id: cc76f083594aac04c74a4ef271305238b06710eb
This commit is contained in:
parent
dbe37e7898
commit
fb46e39cad
|
@ -189,12 +189,21 @@ class Cache {
|
|||
}
|
||||
|
||||
_getCacheFilePath(options) {
|
||||
let mtime;
|
||||
try {
|
||||
({mtime} = fs.statSync(options.transformModulePath));
|
||||
mtime = String(mtime.getTime());
|
||||
} catch (error) {
|
||||
mtime = '';
|
||||
}
|
||||
|
||||
return getCacheFilePath(
|
||||
'react-packager-cache-',
|
||||
version,
|
||||
options.projectRoots.join(',').split(path.sep).join('-'),
|
||||
options.cacheVersion || '0',
|
||||
options.transformModulePath,
|
||||
mtime
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue