You can use the Sentry Rollup plugin to automatically create releases and upload source maps to Sentry when bundling your app.

Automatic Setup

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

npx @sentry/wizard@latest -i sourcemaps

The wizard will guide you through the following steps:

  • Logging into Sentry and selecting a
    projectRepresents your service in Sentry and allows you to scope events to a distinct application.
  • Installing the necessary Sentry packages
  • Configuring your build tool to generate and upload source maps
  • Configuring your CI to upload source maps

If you want to configure source maps upload with rollup manually, follow the steps below.

Manual Setup

Install the Sentry Rollup plugin:

npm install @sentry/rollup-plugin --save-dev


To upload source maps you have to configure an auth

tokenIn search, a key-value pair or raw search term. Also, a value used for authorization.
. Auth tokens can be passed to the plugin explicitly with the authToken option, with a SENTRY_AUTH_TOKEN environment variable, or with an .env.sentry-build-plugin file in the working directory when building your
projectRepresents your service in Sentry and allows you to scope events to a distinct application.
. We recommend you add the auth token to your CI/CD environment as an environment variable.

Learn more about configuring the plugin in our Sentry Rollup Plugin documentation.



import { sentryRollupPlugin } from "@sentry/rollup-plugin";

export default {
  output: {
    sourcemap: true, // Source map generation must be turned on
  plugins: [
    // Put the Sentry rollup plugin after all other plugins
      org: "example-org",
      project: "example-project",
      authToken: process.env.SENTRY_AUTH_TOKEN,
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").
Suggest an edit to this page   |  Contribute to Docs   |  

Report a Problem

🎉 Thank you for your feedback! 🙌
Report a problem