Use the Nx monorepo for the backend and web frontend, and a separate Expo app.
By doing this, we avoid issues between Nx and Expo, as highlighted in the following GitHub issues: #22631, #26257, and #26285.
Another benefit is that we can use the Expo CLI without encountering version problems in package.json
and node_modules
.
To use backend packages from the monorepo in the Expo app, we can utilize Yarn imports like this:
{
"dependencies": {
"@monorepo/<package_name>": "file:../monorepo/dist/packages/<package_name>"
}
}
Another Yarn import strategy involves using
yarn link
.
We still need to work on publishing monorepo packages privately and setting up GitHub Actions for automatic updates in Expo.