import LRU from 'lru-cache' ; import * as fs from 'fs' ; const lru = new LRU ( { max : 256 , maxAge : 250 } ) ; const origLstat = fs . realpathSync . bind ( fs ) ; require ( 'fs' ) . realpathSync = function ( p ) { let r = lru . get ( p ) ; if ( r ) { return r ; } r = origLstat ( p ) ; lru . set ( p , r ) ; return r ; } ;