A filesystem cache helper extracted from babel-loader's fs-cache module. Version 1.0.3 is the latest and only release. This package provides a simple promisified file system cache that stores compiled results on disk, checking timestamps and content hashes to invalidate stale entries. It is a standalone extraction from the babel-loader source. Not recommended for direct use; prefer babel-loader or other caching solutions like webpack's persistent cache.
npm install loader-fs-cacheVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: import, find cache directory, set up cache options, and check for cache hit/miss.
Use babel-loader's built-in cache or implement your own caching with find-cache-dir and fs.
Ensure you include a hash of the source in the identifier or config to guarantee invalidation.
Provide a fallback directory when using `findCacheDir`.
npm install find-cache-dir
Use `import cache from 'loader-fs-cache'` instead of `import { cache } from 'loader-fs-cache'`.