perf: optimize EAS build caching and Metro bundling

Improves build performance by adding platform-specific cache paths including Gradle and iOS Pods directories. Updates cache keys to use app.config.js instead of package.json for more accurate invalidation.

Enhances Metro minification with Hermes-optimized settings, adds ASCII-only output, and enables advanced compression optimizations like dead code elimination and variable reduction.

Configures production environment variables for bundle size optimization across preview and production builds.
This commit is contained in:
Uruk
2025-09-26 16:31:01 +02:00
parent 49ece8d34e
commit edc9c8640d
2 changed files with 45 additions and 14 deletions

View File

@@ -6,8 +6,14 @@
"development": {
"resourceClass": "medium",
"cache": {
"key": "development-{{ checksum \"bun.lock\" \"package.json\" }}",
"paths": ["~/.bun/install/cache", "node_modules", ".expo"]
"key": "dev-{{ checksum \"bun.lock\" \"app.config.js\" }}",
"paths": [
"~/.bun/install/cache",
"node_modules",
".expo",
"android/.gradle",
"ios/Pods"
]
},
"environment": "development",
"developmentClient": true,
@@ -55,19 +61,34 @@
"preview": {
"resourceClass": "large",
"cache": {
"key": "preview-{{ checksum \"bun.lock\" \"package.json\" }}",
"paths": ["~/.bun/install/cache", "node_modules", ".expo"]
"key": "preview-{{ checksum \"bun.lock\" \"app.config.js\" }}",
"paths": [
"~/.bun/install/cache",
"node_modules",
".expo",
"android/.gradle",
"ios/Pods",
".next"
]
},
"distribution": "internal",
"env": {
"EXPO_OPTIMIZE_BUNDLE_SIZE": "1",
"NODE_ENV": "production",
"EXPO_PUBLIC_WRITE_DEBUG": "1"
}
},
"production": {
"resourceClass": "large",
"cache": {
"key": "production-{{ checksum \"bun.lock\" \"package.json\" }}",
"paths": ["~/.bun/install/cache", "node_modules", ".expo"]
"key": "production-{{ checksum \"bun.lock\" \"app.config.js\" }}",
"paths": [
"~/.bun/install/cache",
"node_modules",
".expo",
"android/.gradle",
"ios/Pods"
]
},
"environment": "production",
"channel": "0.36.0",
@@ -77,6 +98,10 @@
},
"ios": {
"image": "latest"
},
"env": {
"EXPO_OPTIMIZE_BUNDLE_SIZE": "1",
"NODE_ENV": "production"
}
},
"production-apk": {