To enable source-maps plugin to work for an expo project in a monorepo, based on yarn workspaces
Design
The @bugsnag/expo-eas-sourcemaps-plugin updates the android and iOS build configuration with the necessary steps to execute an upload using the @bugsnag/source-maps library, and has a hardcoded path to the relevant binaries. (in node_modules)
We must prevent these binaries from being hoisted when using yarn workspaces, so after selecting the option to automatically uploads source maps, the cli tool will:
Install necessary dev dependencies
Update app.json (expo config) with the new plugin
Detect version of yarn being used (either classic or version 2 and above)
Detect whether using yarn workspaces
Update package.json based on the yarn version and workspaces configuration
This will prevent the dependencies from being hoisted, and therefore enable the plugin to upload source maps during eas build
Testing
Installed and built expo project using eas from within a monorepo, and as a standalone application using yarn v1.x and v3.x, tests updated
Goal
To enable source-maps plugin to work for an expo project in a monorepo, based on yarn workspaces
Design
The
@bugsnag/expo-eas-sourcemaps-plugin
updates the android and iOS build configuration with the necessary steps to execute an upload using the@bugsnag/source-maps
library, and has a hardcoded path to the relevant binaries. (in node_modules)We must prevent these binaries from being hoisted when using yarn workspaces, so after selecting the option to automatically uploads source maps, the cli tool will:
app.json
(expo config) with the new pluginpackage.json
based on the yarn version and workspaces configurationThis will prevent the dependencies from being hoisted, and therefore enable the plugin to upload source maps during
eas build
Testing
Installed and built expo project using eas from within a monorepo, and as a standalone application using yarn v1.x and v3.x, tests updated