Add support for `app.config.js`
Description of the feature
Next to app.json and app.config.json, this library should support having a dynamic config.
Motivation
It's new and paves the path to a new set of tools to use for managing expo manifests.
Additional context
An example could be something like:
import * as versions from 'standard-version-expo';
import pkg from './package.json';
export default {
name: 'awesomeapp',
version: pkg.version,
ios: {
bundleIdentifier: 'com.acme.awesomeapp',
buildNumber: versions.ios(pkg.version),
},
android: {
package: 'com.acme.awesomeapp',
versionCode: versions.android(pkg.version),
}
}
This only works with deterministic methods, for incremental updates this would not work (which is kind of the reason why increments are not that great 😅)
A possible workaround is to use app.json and app.config.js. Example:
app.json:
{
"expo": {
"version": "0.2.5"
}
}
app.config.js:
import appJson from "./app.json";
export default {
...
version: appJson.expo.version,
...
}
There are actually other tools that don't play nice with app.config.js (e.g., detox)
@oriharel I believe the proper way to do this is:
// app.config.(js|ts)
export default function (config) {
return {
...config,
// other values
}
}
The config parameter is the contents of app.json
@byCedric any update on this one? We use app.config.js and we can't automate our CI for EAS Submit because version must be bumped every time otherwise app store rejects the build.
@josmithua's answer is correct, although you should destructurize the function parameters:
export default function ({ config })
Not only your app.json values are passed to the function. Passing all of them will lead to errors.

Has anyone found any better solution for this issue?