---
title: "Source Maps"
description: "Upload your source maps to Sentry to enable readable stack traces in your errors."
url: https://docs.sentry.io/platforms/javascript/sourcemaps/
---

# Source Maps | Sentry for JavaScript

To enable readable stack traces in your Sentry errors, you need to upload your source maps to [Sentry](https://sentry.io/welcome/).

The easiest way to configure uploading source maps is by using the [Sentry Wizard](https://docs.sentry.io/platforms/javascript/sourcemaps.md#uploading-source-maps).

See how uploading source maps lets you see the exact line of code that caused an error:

## [Uploading Source Maps](https://docs.sentry.io/platforms/javascript/sourcemaps.md#uploading-source-maps)

The easiest way to configure uploading source maps is by using the Sentry Wizard:

```bash
npx @sentry/wizard@latest -i sourcemaps
```

The wizard will guide you through the following steps:

* Logging into Sentry and selecting a project
* Installing the necessary Sentry packages
* Configuring your build tool to generate and upload source maps
* Configuring your CI to upload source maps

**Note:** Source maps are only generated and uploaded during **production builds**. Development builds typically do not generate source maps for upload.

This guide assumes you are using a Browser JavaScript SDK. For instructions on how to set up source maps for React Native, follow the [source maps guide for React Native](https://docs.sentry.io/platforms/react-native/sourcemaps.md).

If you want to configure source maps to upload manually, follow the guide for your bundler or build tool below.

By default, Sentry will link source maps by injecting [Debug IDs](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/debug-ids.md) into your build output. Alternatively, there are also [other methods](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/legacy-uploading-methods.md) to associate source maps with Sentry that do not require modifying your build output.

## [Sentry Bundler Support](https://docs.sentry.io/platforms/javascript/sourcemaps.md#sentry-bundler-support)

* [webpack](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/webpack.md)
* [Rollup](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/rollup.md)
* [Vite](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/vite.md)
* [esbuild](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/esbuild.md)

### [Guides for Source Maps](https://docs.sentry.io/platforms/javascript/sourcemaps.md#guides-for-source-maps)

* [TypeScript (tsc)](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/typescript.md)

If you're using one of webpack, Vite, Rollup, or Esbuild, use the corresponding Sentry plugin instead (see section "Sentry Bundler Support").

* [UglifyJS](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/uglifyjs.md)
* [SystemJS](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/systemjs.md)
* [GitHub Actions](https://docs.sentry.io/product/releases/setup/release-automation/github-actions.md)

## [Other Tools](https://docs.sentry.io/platforms/javascript/sourcemaps.md#other-tools)

If you're not using one of these tools, we assume you already know how to generate source maps with your toolchain and we recommend you upload them using [Sentry CLI](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/cli.md).

Though we strongly recommend uploading source maps as part of your build process, for browser applications it's also possible to [host your source maps publicly](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/hosting-publicly.md).

## [Troubleshooting](https://docs.sentry.io/platforms/javascript/sourcemaps.md#troubleshooting)

Having issues with source maps? Here are common problems:

* **"Sentry not part of build pipeline"** - Your deployed code is missing Debug IDs. Run the wizard (`npx @sentry/wizard@latest -i sourcemaps`) and ensure you're running a production build.
* **Source maps not applying** - Verify artifacts are uploaded before errors occur.

For detailed troubleshooting steps, see [Troubleshooting Source Maps](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js.md).

## [Additional Resources](https://docs.sentry.io/platforms/javascript/sourcemaps.md#additional-resources)

* [Using sentry-cli to Upload Source Maps](https://docs.sentry.io/cli/releases.md#sentry-cli-sourcemaps)
* [4 Reasons Why Your Source Maps Are Broken](https://blog.sentry.io/2018/10/18/4-reasons-why-your-source-maps-are-broken)

## Pages in this section

- [Uploading Source Maps](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading.md)
- [Troubleshooting Source Maps](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js.md)
