← ClaudeAtlas

expo-app-configlisted

Choosing between app.json vs app.config.ts vs app.config.js, environment variables, variants, extra fields, plugin chain, and slug/scheme/bundle/version discipline. Triggers on app.json, app.config.ts, app.config.js, expo config, environment variable, .env, eas secret, variant, extra field, slug, scheme, bundle identifier, package name, version, build number, version code.
fatihkan/badi · ★ 5 · AI & Automation · score 76
Install: claude install-skill fatihkan/badi
# expo-app-config Choosing among `app.json`, `app.config.ts`, `app.config.js`, plus environment variables, variants (dev/staging/prod), and identifier discipline. The plugin chain lives in `expo-config-plugin`. ## What It Does - `app.json` vs `app.config.ts` vs `app.config.js` decision - Environment variables (`.env`, `EXPO_PUBLIC_*`, EAS Secrets) - Multi-variant (dev/staging/production) configuration - `extra` field discipline and runtime access - Slug, scheme, bundleIdentifier, package, version, buildNumber management - Plugin chain order ## Which Format? | Format | Advantage | Limit | When? | |--------|-----------|-------|-------| | `app.json` | Static, simple | No JS, no env | Single variant, simple | | `app.config.js` | Dynamic, env | No TypeScript | Older choice | | `app.config.ts` | Dynamic + typed | Compile step | **Recommended** | > Use `app.config.ts` in most projects. Keep `app.json` as a static fallback or drop it entirely. ## `app.config.ts` Template ```ts import { ExpoConfig, ConfigContext } from "expo/config"; export default ({ config }: ConfigContext): ExpoConfig => { const variant = process.env.APP_VARIANT ?? "development"; const isProduction = variant === "production"; return { ...config, name: variantName(variant), slug: "myapp", scheme: "myapp", version: "1.2.0", orientation: "portrait", icon: `./assets/icon-${variant}.png`, userInterfaceStyle: "automatic", splash: { image: "./assets/splash.png",