Skip to content

Source maps - EAS Build

If you build with EAS Build, Pionne ships a command that wires everything up in one shot.

Terminal window
npx @pionne/react-native setup

This command:

  1. Asks for your PIONNE_AUTH_TOKEN (user token, different from the project token).
  2. Asks for your PIONNE_PROJECT_ID.
  3. Creates three EAS Secrets via eas secret:create.
  4. Writes eas-build-on-success.sh at the project root.
  5. 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.

VariableSourceUse
PIONNE_AUTH_TOKENUser account (Settings → Auth tokens)Upload authentication
PIONNE_PROJECT_IDProject settingsUpload target
PIONNE_APIhttps://api.pionne.appOverride for self-host

The generated file looks like:

#!/usr/bin/env bash
set -e
if [ -z "$PIONNE_AUTH_TOKEN" ] || [ -z "$PIONNE_PROJECT_ID" ]; then
echo "Pionne: missing secrets, skipping upload"
exit 0
fi
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.

{
"build": {
"production": {
"env": {
"PIONNE_API": "https://api.pionne.app"
}
}
}
}

The secrets themselves are injected automatically by EAS.

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.