mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 06:04:15 +00:00
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
9
packager/react-packager/src/Cache/index.js
vendored
9
packager/react-packager/src/Cache/index.js
vendored
@ -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…
x
Reference in New Issue
Block a user