> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Source maps

> Upload source maps so Squasher can resolve readable production stack traces.

Source maps let Squasher translate minified production stack traces back to original source files and line numbers.

## When to upload

Upload source maps for the same release you attach to your SDK events.

## Basic upload flow

1. Build your application.
2. Collect the generated `.map` files.
3. Upload them during CI before or alongside deployment.

## Example

```bash theme={null}
squasher sourcemaps upload \
  --project "$SQUASHER_PROJECT_ID" \
  --release "$GIT_SHA" \
  .next/static/**/*.map
```

## Best practices

* Keep the `release` value consistent between your SDK config and your upload step.
* Upload source maps for every production deployment.
* Do not expose private source map files publicly if your build pipeline can keep them internal.

## Agent handoff

```text theme={null}
Upload Squasher source maps for release <release>. Build production assets first, run the sourcemaps upload command with --project and --release, and verify the release appears in sourcemaps list. Do not upload source maps with secrets embedded in source content.
```
