Source maps

Minified JavaScript is unreadable. Upload your source maps once per build and every frame is mapped back to the original file, line and function.

Create an auth token

In the dashboard, open Settings → Auth Tokens and create a token with the project:releases scope. Store it as SENTRY_AUTH_TOKEN in your CI secrets.

Upload with debug IDs (recommended)

sourcemaps inject writes a debug ID into each bundle and its map, so the right map is found without matching file names or releases. Point SENTRY_URL at this server.

bash

export SENTRY_URL=https://errortrack.altixcode.com
export SENTRY_ORG=<org-slug>
export SENTRY_PROJECT=<project-slug>
export SENTRY_AUTH_TOKEN=<an auth token from Settings → Auth Tokens>

# After your production build:
npx @sentry/cli sourcemaps inject ./dist
npx @sentry/cli sourcemaps upload ./dist

Or upload for a release

Older setups match maps by release and file name. The release and dist you pass must match what the SDK sends.

bash

npx @sentry/cli sourcemaps upload --release=my-app@1.4.0 --dist=web ./dist

Bundler and framework plugins

The Vite, webpack, Next.js, Nuxt, SvelteKit and Astro plugins read the same SENTRY_URL, SENTRY_ORG, SENTRY_PROJECT and SENTRY_AUTH_TOKEN variables. Set them in the build environment.

React Native and Expo

The Xcode and Gradle build steps upload the Hermes maps. Set defaults.url in sentry.properties, or url in the Expo plugin options, to this server.

When a frame stays minified

Check that the bundle you deployed is the one you uploaded (same debug ID), or that the release and dist match exactly. Maps over the upload limits are rejected by the CLI with a message.