Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 1.93 KB

File metadata and controls

68 lines (49 loc) · 1.93 KB

Sentry

Sentry Rollup Plugin

npm version npm dm npm dt

A Rollup plugin that provides source map and release management support for Sentry.

Installation

Using npm:

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

Using yarn:

yarn add @sentry/rollup-plugin --dev

Using pnpm:

pnpm add @sentry/rollup-plugin --save-dev

Example

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

export default {
  plugins: [
    // Put the Sentry rollup plugin after all other plugins
    sentryRollupPlugin({
      org: process.env.SENTRY_ORG,
      project: process.env.SENTRY_PROJECT,

      // Auth tokens can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/
      authToken: process.env.SENTRY_AUTH_TOKEN,
    }),
  ],
  output: {
    sourcemap: true, // Source map generation must be turned on
  },
};

#OPTIONS_SECTION_INSERT#

Configuration File

As an additional configuration method, the Sentry Rollup plugin will pick up environment variables configured inside a .env.sentry-build-plugin file located in the current working directory when building your app.

More information