eas-local-cache
v1.0.4
Published
A custom build cache provider for Expo CLI. Uses local to store builds.
Maintainers
Readme
EAS Local Cache
Introduction
EAS Local Cache is a library designed to optimize build times by caching build artifacts locally. This allows subsequent builds with the same configuration to reuse previously built artifacts instead of rebuilding them from scratch.
Installation
To install EAS Local Cache, select your preferred package manager:
npm
npm install --save-dev eas-local-cachebun
bun add eas-local-cache -DAdd the following configuration to your app.config.ts:
experiments: {
typedRoutes: true,
buildCacheProvider: {
plugin: 'eas-local-cache',
},
}How It Works
EAS Local Cache implements two main functions:
- Resolving Build Cache: Checks if a build with the same fingerprint already exists in the cache.
- Uploading Build Cache: Stores successful builds in the cache for future use.
The system generates a unique fingerprint hash for each build configuration. If the exact same configuration is built again, the cached version will be used, significantly reducing build times.
Features
- Cross-Platform Support: Works with both iOS and Android builds.
- Intelligent File Handling: Properly handles both directory structures (iOS .app bundles) and single files (Android .apk).
- Reliable Copying: Uses platform-specific copy mechanisms for maximum reliability.
Cache Storage
Build artifacts are stored in the .expo/cache directory at the project root.
Files are named according to the pattern:
- iOS:
ios_[fingerprintHash].app - Android:
android_[fingerprintHash].apk
Usage
EAS Local Cache is automatically used by Expo when building your application. No additional configuration is required.
To clear the cache manually, you can delete the .expo/cache directory in your project root:
rm -rf .expo/cacheTroubleshooting
If you're experiencing issues with cached builds:
- Check file permissions in the cache directory.
- Verify that the cache directory has sufficient disk space.
- Clear the cache directory and try again.
Contributing
Contributions are welcome — bug reports, docs fixes, and cache-correctness fixes especially.
git clone https://github.com/dennytosp/eas-local-cache.git
cd eas-local-cache
bun install
bun run typecheck # tsc --noEmit over src/ and test/
bun test # integration tests against a temporary project root
bun run build # tsc -> build/These three commands are exactly what CI runs on every pull request, on both Ubuntu and macOS. See CONTRIBUTING.md for the full guide (including how to link the plugin into a real Expo app), and CODE_OF_CONDUCT.md for community expectations.
- Found a bug? Open an issue
- Have a usage question? Start a discussion
- Found a security problem? See SECURITY.md — please do not open a public issue
Changelog
See CHANGELOG.md.
License
MIT © Phong Dinh
