Files
Tracearr/apps/mobile/app.config.js
Rephl3x 3015f48118
Some checks failed
CI / Lint & Typecheck (push) Has been cancelled
CI / Test (routes) (push) Has been cancelled
CI / Test (security) (push) Has been cancelled
CI / Test (services) (push) Has been cancelled
CI / Test (unit) (push) Has been cancelled
CI / Test (integration) (push) Has been cancelled
CI / Test Coverage (push) Has been cancelled
CI / Build (push) Has been cancelled
Initial Upload
2025-12-17 12:32:50 +13:00

35 lines
935 B
JavaScript

/**
* Dynamic Expo config that extends app.json
* Allows injecting secrets from environment variables at build time
*/
const baseConfig = require('./app.json');
module.exports = ({ config }) => {
// Merge base config with dynamic values
return {
...baseConfig.expo,
...config,
plugins: [
// Keep existing plugins but update expo-maps with API key from env
...baseConfig.expo.plugins.map((plugin) => {
// Handle expo-maps plugin
if (Array.isArray(plugin) && plugin[0] === 'expo-maps') {
return [
'expo-maps',
{
...plugin[1],
android: {
...plugin[1]?.android,
// Inject Google Maps API key from EAS secrets or env var
googleMapsApiKey: process.env.GOOGLE_MAPS_API_KEY || '',
},
},
];
}
return plugin;
}),
],
};
};