rnr-starter
Version:
A comprehensive React Native Expo boilerplate with 50+ modern UI components, dark/light themes, i18n, state management, and production-ready architecture
88 lines (84 loc) • 2.11 kB
text/typescript
import { ConfigContext, ExpoConfig } from 'expo/config';
/**
* Dynamic Expo configuration
*
* Expo automatically loads environment variables from .env and .env.local
* files into process.env.
*
* Required env variables for builds:
* - EXPO_PUBLIC_APP_NAME
* - EXPO_PUBLIC_APP_SLUG
* - EXPO_PUBLIC_BUNDLE_ID
* - EAS_PROJECT_ID
* - EXPO_OWNER
*/
export default ({ config }: ConfigContext): ExpoConfig => {
const appName = process.env.EXPO_PUBLIC_APP_NAME || 'RNR Starter';
const appSlug = process.env.EXPO_PUBLIC_APP_SLUG || 'rnr-starter';
const bundleId = process.env.EXPO_PUBLIC_BUNDLE_ID || 'com.yourcompany.yourapp';
const easProjectId = process.env.EAS_PROJECT_ID;
const expoOwner = process.env.EXPO_OWNER || 'your-expo-username';
return {
...config,
name: appName,
slug: appSlug,
version: '1.4.0',
orientation: 'portrait',
icon: './assets/images/icon.png',
scheme: bundleId,
userInterfaceStyle: 'automatic',
newArchEnabled: true,
splash: {
image: './assets/images/splash.png',
resizeMode: 'contain',
backgroundColor: '#ffffff',
},
assetBundlePatterns: ['**/*'],
ios: {
supportsTablet: true,
bundleIdentifier: bundleId,
infoPlist: {
ITSAppUsesNonExemptEncryption: false,
},
},
android: {
adaptiveIcon: {
foregroundImage: './assets/images/adaptive-icon.png',
backgroundColor: '#ffffff',
},
package: bundleId,
},
web: {
bundler: 'metro',
output: 'static',
favicon: './assets/images/favicon.png',
},
plugins: [
'expo-router',
[
'expo-build-properties',
{
android: {
minSdkVersion: 26,
targetSdkVersion: 36,
},
ios: {
deploymentTarget: '15.1',
},
},
],
'expo-localization',
'expo-secure-store',
],
experiments: {
typedRoutes: true,
},
extra: {
router: {},
eas: {
projectId: easProjectId,
},
},
owner: expoOwner,
};
};