Source maps - EAS Build
If you build with EAS Build, Pionne ships a command that wires everything up in one shot.
One-command setup
Section titled “One-command setup”npx @pionne/react-native setupThis command:
- Asks for your
PIONNE_AUTH_TOKEN(user token, different from the project token). - Asks for your
PIONNE_PROJECT_ID. - Creates three EAS Secrets via
eas secret:create. - Writes
eas-build-on-success.shat the project root. - References the hook in
eas.json.
On every successful EAS build, the hook automatically uploads the Metro .map to Pionne with the right release and platform.
EAS Secret variables created
Section titled “EAS Secret variables created”| Variable | Source | Use |
|---|---|---|
PIONNE_AUTH_TOKEN | User account (Settings → Auth tokens) | Upload authentication |
PIONNE_PROJECT_ID | Project settings | Upload target |
PIONNE_API | https://api.pionne.app | Override for self-host |
The eas-build-on-success.sh hook
Section titled “The eas-build-on-success.sh hook”The generated file looks like:
#!/usr/bin/env bashset -e
if [ -z "$PIONNE_AUTH_TOKEN" ] || [ -z "$PIONNE_PROJECT_ID" ]; then echo "Pionne: missing secrets, skipping upload" exit 0fi
RELEASE="${EAS_BUILD_GIT_COMMIT_HASH:-$(node -p "require('./app.json').expo.version")}"PLATFORM="$EAS_BUILD_PLATFORM"
npx @pionne/react-native upload-sourcemaps \ --token "$PIONNE_AUTH_TOKEN" \ --project "$PIONNE_PROJECT_ID" \ --release "$RELEASE" \ --platform "$PLATFORM"You can edit it: for instance, force a release read from app.json instead of the commit hash.
eas.json reference
Section titled “eas.json reference”{ "build": { "production": { "env": { "PIONNE_API": "https://api.pionne.app" } } }}The secrets themselves are injected automatically by EAS.
Verify the upload
Section titled “Verify the upload”In the Pionne dashboard, open Settings → Source maps. You should see one entry per (release, platform) with a size in KB and the upload date.