Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@sentry/webpack-plugin

getsentry7.4mMIT3.0.0TypeScript support: included

Official Sentry Webpack plugin

Sentry, Webpack, bundler, plugin

readme

Sentry

Sentry Webpack Plugin

npm version npm dm npm dt

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

Installation

Using npm:

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

Using yarn:

yarn add @sentry/webpack-plugin --dev

Using pnpm:

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

Example

// webpack.config.js
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");

module.exports = {
  // ... other config above ...

  devtool: "source-map", // Source map generation must be turned on
  plugins: [
    sentryWebpackPlugin({
      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,
    }),
  ],
};

Options

org

Type: string

The slug of the Sentry organization associated with the app.

This value can also be specified via the SENTRY_ORG environment variable.

project

The slug of the Sentry project associated with the app.

This value can also be specified via the SENTRY_PROJECT environment variable.

authToken

Type: string

The authentication token to use for all communication with Sentry. Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.

This value can also be specified via the SENTRY_AUTH_TOKEN environment variable.

url

Type: string

The base URL of your Sentry instance. Use this if you are using a self-hosted or Sentry instance other than sentry.io.

This value can also be set via the SENTRY_URL environment variable.

Defaults to https://sentry.io/, which is the correct value for SaaS customers.

headers

Type: Record<string, string>

Headers added to every outgoing network request.

debug

Type: boolean

Print useful debug information. Defaults to false.

silent

Type: boolean

Suppresses all logs. Defaults to false.

errorHandler

Type: (err: Error) => void

When an error occurs during release creation or sourcemaps upload, the plugin will call this function.

By default, the plugin will simply throw an error, thereby stopping the bundling process. If an errorHandler callback is provided, compilation will continue, unless an error is thrown in the provided callback.

To allow compilation to continue but still emit a warning, set this option to the following:

errorHandler: (err) => {
  console.warn(err);
}

telemetry

Type: boolean

If set to true, internal plugin errors and performance data will be sent to Sentry.

At Sentry we like to use Sentry ourselves to deliver faster and more stable products. We're very careful of what we're sending. We won't collect anything other than error and high-level performance data. We will never collect your code or any details of the projects in which you're using this plugin.

Defaults to true.

disable

Type: boolean

Completely disables all functionality of the plugin. Defaults to false.

sourcemaps

Options for uploading source maps.

sourcemaps.assets

Type: string | string[]

A glob or an array of globs that specifies the build artifacts that should be uploaded to Sentry.

If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.

The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)

Use the debug option to print information about which files end up being uploaded.

sourcemaps.ignore

Type: string | string[]

A glob or an array of globs that specifies which build artifacts should not be uploaded to Sentry.

Default: []

The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)

Use the debug option to print information about which files end up being uploaded.

sourcemaps.rewriteSources

Type: (source: string, map: any) => string

Hook to rewrite the sources field inside the source map before being uploaded to Sentry. Does not modify the actual source map. Effectively, this modifies how files inside the stacktrace will show up in Sentry.

Defaults to making all sources relative to process.cwd() while building.

sourcemaps.filesToDeleteAfterUpload

Type: string | string[]

A glob or an array of globs that specifies the build artifacts that should be deleted after the artifact upload to Sentry has been completed.

The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)

Use the debug option to print information about which files end up being deleted.

sourcemaps.disable

Type: boolean

Disables all functionality related to sourcemaps.

Defaults to false.

release

Options related to managing the Sentry releases for a build.

More info: https://docs.sentry.io/product/releases/

release.name

Type: string

Unique identifier for the release you want to create.

This value can also be specified via the SENTRY_RELEASE environment variable.

Defaults to automatically detecting a value for your environment. This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git HEAD's commit SHA. (the latter requires access to git CLI and for the root directory to be a valid repository)

If you didn't provide a value and the plugin can't automatically detect one, no release will be created.

release.inject

Type: boolean

Whether the plugin should inject release information into the build for the SDK to pick it up when sending events. (recommended)

Defaults to true.

release.create

Type: boolean

Whether the plugin should create a release on Sentry during the build. Note that a release may still appear in Sentry even if this is value is false because any Sentry event that has a release value attached will automatically create a release. (for example via the inject option)

Defaults to true.

release.finalize

Type: boolean

Whether the Sentry release should be automatically finalized (meaning an end timestamp is added) after the build ends.

Defaults to true.

release.dist

Type: string

Unique identifier for the distribution, used to further segment your release.

release.vcsRemote

Type: string

Version control system remote name.

This value can also be specified via the SENTRY_VSC_REMOTE environment variable.

Defaults to 'origin'.

release.setCommits

Option to associate the created release with its commits in Sentry.

release.setCommits.previousCommit

Type: string

The commit before the beginning of this release (in other words, the last commit of the previous release).

Defaults to the last commit of the previous release in Sentry.

If there was no previous release, the last 10 commits will be used.

release.setCommits.ignoreMissing

Type: boolean

If the flag is to true and the previous release commit was not found in the repository, the plugin creates a release with the default commits count instead of failing the command.

Defaults to false.

release.setCommits.ignoreEmpty

Type: boolean

If this flag is set, the setCommits step will not fail and just exit silently if no new commits for a given release have been found.

Defaults to false.

release.setCommits.auto

Type: boolean

Automatically sets commit and previousCommit. Sets commit to HEAD and previousCommit as described in the option's documentation.

If you set this to true, manually specified commit and previousCommit options will be overridden. It is best to not specify them at all if you set this option to true.

release.setCommits.repo

Type: string

The full repo name as defined in Sentry.

Required if the auto option is not set to true.

release.setCommits.commit

Type: string

The current (last) commit in the release.

Required if the auto option is not set to true.

release.deploy

Adds deployment information to the release in Sentry.

release.deploy.env

Type: string

Environment for this release. Values that make sense here would be production or staging.

release.deploy.started

Type: number | string

Deployment start time in Unix timestamp (in seconds) or ISO 8601 format.

release.deploy.finished

Type: number | string

Deployment finish time in Unix timestamp (in seconds) or ISO 8601 format.

release.deploy.time

Type: number

Deployment duration (in seconds). Can be used instead of started and finished.

release.deploy.name

Type: string

Human readable name for the deployment.

release.deploy.url

Type: string

URL that points to the deployment.

release.cleanArtifacts

Type: boolean

Remove all previously uploaded artifacts for this release on Sentry before the upload.

Defaults to false.

Deprecation Notice: cleanArtifacts is deprecated and will does currently not do anything. Historically it was needed since uploading the same artifacts twice was not allowed. Nowadays, when uploading artifacts with the same name more than once to the same release on Sentry, Sentry will prefer the most recent artifact for source mapping.

release.uploadLegacySourcemaps

Type: string | IncludeEntry | Array<string | IncludeEntry>

Legacy method of uploading source maps. (not recommended unless necessary) One or more paths that should be scanned recursively for sources.

Each path can be given as a string or an object with more specific options.

The modern version of doing source maps upload is more robust and way easier to get working but has to inject a very small snippet of JavaScript into your output bundles. In situations where this leads to problems (e.g subresource integrity) you can use this option as a fallback.

Please note that this option will not interact with any settings provided in the sourcemaps option. Using uploadLegacySourcemaps is a completely separate upload mechanism we provide for backwards-compatibility.

The IncludeEntry type looks as follows:

type IncludeEntry = {
    /**
     * One or more paths to scan for files to upload.
     */
    paths: string[];

    /**
     * One or more paths to ignore during upload.
     * Overrides entries in ignoreFile file.
     *
     * Defaults to `['node_modules']` if neither `ignoreFile` nor `ignore` is set.
     */
    ignore?: string | string[];

    /**
     * Path to a file containing list of files/directories to ignore.
     *
     * Can point to `.gitignore` or anything with the same format.
     */
    ignoreFile?: string;

    /**
     * Array of file extensions of files to be collected for the file upload.
     *
     * By default the following file extensions are processed: js, map, jsbundle and bundle.
     */
    ext?: string[];

    /**
     * URL prefix to add to the beginning of all filenames.
     * Defaults to '~/' but you might want to set this to the full URL.
     *
     * This is also useful if your files are stored in a sub folder. eg: url-prefix '~/static/js'.
     */
    urlPrefix?: string;

    /**
     * URL suffix to add to the end of all filenames.
     * Useful for appending query parameters.
     */
    urlSuffix?: string;

    /**
     * When paired with the `rewrite` option, this will remove a prefix from filename references inside of
     * sourcemaps. For instance you can use this to remove a path that is build machine specific.
     * Note that this will NOT change the names of uploaded files.
     */
    stripPrefix?: string[];

    /**
     * When paired with the `rewrite` option, this will add `~` to the `stripPrefix` array.
     *
     * Defaults to `false`.
     */
    stripCommonPrefix?: boolean;

    /**
     * Determines whether sentry-cli should attempt to link minified files with their corresponding maps.
     * By default, it will match files and maps based on name, and add a Sourcemap header to each minified file
     * for which it finds a map. Can be disabled if all minified files contain sourceMappingURL.
     *
     * Defaults to true.
     */
    sourceMapReference?: boolean;

    /**
     * Enables rewriting of matching source maps so that indexed maps are flattened and missing sources
     * are inlined if possible.
     *
     * Defaults to true
     */
    rewrite?: boolean;

    /**
     * When `true`, attempts source map validation before upload if rewriting is not enabled.
     * It will spot a variety of issues with source maps and cancel the upload if any are found.
     *
     * Defaults to `false` as this can cause false positives.
     */
    validate?: boolean;
};

bundleSizeOptimizations

Options related to bundle size optimizations. These options will allow you to optimize and reduce the bundle size of the Sentry SDK.

bundleSizeOptimizations.excludeDebugStatements

Type: boolean

If set to true, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK. Note that the success of this depends on tree shaking being enabled in your build tooling.

Setting this option to true will disable features like the SDK's debug option.

bundleSizeOptimizations.excludeTracing

Type: boolean

If set to true, the plugin will attempt to tree-shake (remove) code within the Sentry SDK that is related to tracing and performance monitoring. Note that the success of this depends on tree shaking being enabled in your build tooling.

Notice: Do not enable this when you're using any performance monitoring-related SDK features (e.g. Sentry.startTransaction()).

bundleSizeOptimizations.excludeReplayShadowDom

Type: boolean

If set to true, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay Shadow DOM recording functionality. Note that the success of this depends on tree shaking being enabled in your build tooling.

This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.

bundleSizeOptimizations.excludeReplayIframe

Type: boolean

If set to true, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay iframe recording functionality. Note that the success of this depends on tree shaking being enabled in your build tooling.

You can safely do this when you do not want to capture any iframe activity via Sentry Session Replay.

bundleSizeOptimizations.excludeReplayWorker

Type: boolean

If set to true, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay's Compression Web Worker. Note that the success of this depends on tree shaking being enabled in your build tooling.

Notice: You should only use this option if you manually host a compression worker and configure it in your Sentry Session Replay integration config via the workerUrl option.

reactComponentAnnotation

Options related to react component name annotations. Disabled by default, unless a value is set for this option. When enabled, your app's DOM will automatically be annotated during build-time with their respective component names. This will unlock the capability to search for Replays in Sentry by component name, as well as see component names in breadcrumbs and performance monitoring. Please note that this feature is not currently supported by the esbuild bundler plugins, and will only annotate React components

reactComponentAnnotation.enabled

Type: boolean

Whether the component name annotate plugin should be enabled or not.

reactComponentAnnotation.ignoredComponents

Type: string[]

A list of strings representing the names of components to ignore. The plugin will not perform apply data-sentry annotations on the DOM element for these components.

moduleMetadata

Type: Record<string, any> | (args: { org?: string; project?: string; release?: string; }) => Record<string, any>

Metadata that should be associated with the built application.

The metadata is serialized and can be looked up at runtime from within the SDK (for example in the beforeSend, event processors, or the transport), allowing for custom event filtering logic or routing of events.

Metadata can either be passed directly or alternatively a callback can be provided that will be called with the following parameters:

  • org: The organization slug.
  • project: The project slug.
  • release: The release name.

applicationKey

Type: string

A key which will embedded in all the bundled files. The SDK will be able to use the key to apply filtering rules, for example using the thirdPartyErrorFilterIntegration.

_experiments

Type: string

Options that are considered experimental and subject to change. This option does not follow semantic versioning and may change in any release.

_experiments.injectBuildInformation

Type: boolean

If set to true, the plugin will inject an additional SENTRY_BUILD_INFO variable. This contains information about the build, e.g. dependencies, node version and other useful data.

Defaults to false.

Configuration File

As an additional configuration method, the Sentry Webpack 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

changelog

Changelog

Unreleased

  • "You know what they say ‘Fool me once, strike one, but fool me twice… strike three.’" — Michael Scott

3.1.0

  • feat(webpack): Gate forced process exit behind experimental flag (#663)

3.0.0

Breaking Changes

  • Injected code will now use let, which was added in ES6 (ES2015). This means that ES6 is the minimum JavaScript version that the Sentry bundler plugins support.

  • Deprecated options have been removed:

    • deleteFilesAfterUpload - Use filesToDeleteAfterUpload instead
    • bundleSizeOptimizations.excludePerformanceMonitoring - Use bundleSizeOptimizations.excludeTracing instead
    • _experiments.moduleMetadata - Use moduleMetadata instead
    • cleanArtifacts - Did not do anything

List of Changes

  • fix!: Wrap injected code in block-statement to contain scope (#646)
  • chore!: Remove deprecated options (#654)
  • feat(logger): Use console methods respective to log level (#652)
  • fix(webpack): Ensure process exits when done (#653)
  • fix: Use correct replacement matcher for bundleSizeOptimizations.excludeTracing (#644)

Work in this release contributed by @jdelStrother. Thank you for your contribution!

2.23.0

  • chore(deps): bump nanoid from 3.3.6 to 3.3.8 (#641)
  • feat(core): Detect Railway release name (#639)
  • feat(core): Write module injections to globalThis (#636)
  • feat(react-component-annotate): Allow skipping annotations on specified components (#617)
  • ref(core): Rename release management plugin name (#647)

Work in this release contributed by @conor-ob. Thank you for your contribution!

2.22.7

  • deps: Bump @sentry/cli to 2.39.1 and require specific version (#632)
  • feat(telemetry): Record if plugin is run in CI (#627)

2.22.6

  • fix(core): Use sha256 instead of md5 to generate uuids from string (#619)

2.22.5

  • fix: Ignore stderr output from git command (#613)
  • feat: Update Sentry telemetry to v8 (#604)
  • deps: Update @sentry/cli to 2.36.1 (#609)

2.22.4

  • feat(react-component-annotate): Handle function body returning a ternary (#598)
  • fix: Allow injection plugins to apply to files with query parameters and fragments in their name (#597)

Work in this release contributed by @Thristhart. Thank you for your contribution!

2.22.3

  • fix(core): Always instantiate global Error class in injected code snippets (#594)

2.22.2

  • fix: Disable debug ID injection when sourcemaps.disable is set (#589)

2.22.1

  • fix: Use sourcemaps.disable to disable debug ID upload instead of legacy upload (#587)
  • fix: Escape release string in injection snippet (#585)

2.22.0

  • deps: Bump @sentry/cli to 2.33.1 (#581)
  • feat: Add bundleSizeOptimizations.excludeTracing option as alias to deprecated bundleSizeOptimizations.excludePerformanceMonitoring (#582)
  • fix(vite-plugin): Ensure post order of sentry-vite-release-injection-plugin to avoid breaking @rollup/plugin-commonjs step (#578)

2.21.1

  • fix: Do not delete files before all upload tasks executed (#572)

Work in this release contributed by @tyouzu1. Thank you for your contribution!

2.21.0

  • fix: Use sequential and post order for vite artifact deletion (#568)
  • feat: Add option to disable sourcemaps (#561)

Work in this release contributed by @tyouzu1. Thank you for your contribution!

2.20.1

  • feat(telemetry): Collect whether applicationKey is set (#559)
  • fix: Wait for tasks depending on sourcemaps before deleting (#557)

2.20.0

  • feat: Export esbuild plugin as default (#555)

2.19.0

  • feat: Don't use word "error" in log message about telemetry (#548)
  • feat(core): Detect releases from more providers (#549)
  • fix: Always delete files when sourcemaps.filesToDeleteAfterUpload is set (#547)
  • fix(vite): Fix environment variable loading issue for Windows (#545)

Work in this release contributed by @Rassilion, and @mateusz-daniluk-xtb. Thank you for your contributions!

2.18.0

  • feat: Add applicationKey option to identify application code from within the SDK (#540)
  • feat: Allow passing of meta-framework as telemetry data (#539)
  • feat: Promote experimental moduleMetadata option to stable (#538)
  • fix(esbuild): Invert warning about bundle: true (#542)

2.17.0

  • feat: Deprecate and noop cleanArtifacts (#525)
  • feat: Support Heroku env vars when inferring release name (#517)
  • fix(docs): Update pnpm install commands (#516)
  • misc(esbuild): Log warning when attempting to inject debug IDs with esbuild bundle option active (#526)

Work in this release contributed by @et84121, and @duailibe. Thank you for your contributions!

2.16.1

  • fix: Create word-based fidelity source mapping for code transformations (#513)
  • fix: Also match .cjs and .mjs files when finding files to upload in rollup-based bundlers (#509)

2.16.0

  • feat(core): Add loggerPrefixOverride meta option (#506)

2.15.0

  • feat: Make options argument optional (#502)
  • ref(annotate): Turn disabled message to debug log (#504)

2.14.3

  • deps(core): Unpin @babel/core, find-up, and glob (#496)

Work in this release contributed by @allanlewis. Thank you for your contribution!

2.14.2

  • feat(core): Bundle in Sentry SDK deps (#487)

2.14.1

  • fix(core): Stop .env files from being picked up (#486)
  • feat(core): Add telemetry for React component annotations (#482)

2.14.0

  • ref(component-annotate): Use default export (#478)

2.13.0

  • ref(component-annotate): Conform to Babel plugin naming conventions

2.12.0

  • ref(component-annotate): Prefix plugin name with babel

2.11.0

  • feat(core): Include component name annotation plugin with all bundler plugins except esbuild (#469)
  • feat(component-annotate): Introduce new plugin to annotate frontend components at build-time (#468)

2.10.3

  • fix(core): Safely flush telemetry

2.10.2

  • deps(core): Bump @sentry/cli to ^2.22.3 (#451)

2.10.1

  • chore: bump @sentry/cli dependency to 2.21.4 (#440)

2.10.0

  • feat: deprecate excludeReplayCanvas config (#436)
  • feat: Add excludeReplayWorker to bundleSizeOptimizations (#433)

2.9.0

  • feat: Allow to configure bundleSizeOptimizations (#428)
  • fix(core): Don't abort source map location guessing when the reference is a URL (#424)
  • fix(core): Widen detection of source maps with .cjs.map and .mjs.map (#422)

2.8.0

  • build(core): Bump Sentry CLI to v2.21.2 (#415)
  • feat: Detect release name for Bitbucket pipelines (#404)
  • feat: Detect release name for Flightcontrol (#411)
  • fix(core): Move git revision to a separate function (#399)
  • fix(esbuild): Don't inject debug IDs into injected modules (#417)

Work in this release contributed by @hoslmelq, @mjomble, and @aquacash5. Thank you for your contributions!

2.7.1

  • docs: Point to org auth token page (#393)
  • fix(webpack): Add default fallback to webpack import (#395)
  • fix: Save results of rewriteSourcesHook (#390)

Work in this release contributed by @adonskoy. Thank you for your contribution!

2.7.0

  • feat: Add module metadata injection for esbuild (#381)
  • feat: Add module metadata injection for vite and rollup (#380)
  • ref: Emit high resolution source-maps with magic-string (#383)
  • ref: Run upload preparation with maximum concurrency (#379)

2.6.2

  • fix: Fix regex in source map locating heuristic via sourceMappingURL (#376)
  • fix: Make sourceMappingURL heuristic more resilient (#378)

Thanks to @tomyam1 for identifying and pinpointing a bug that was hard to spot!

2.6.1

  • fix: Don't crash on failed delete after upload (#373)

2.6.0

  • deps: Bump sentry-cli to 2.20.1 (#355)
  • feat: Allow ommiting org when using organization auth token (#368)
  • ref: Make asset detection more robust (#369)

2.5.0

  • deps: Bump and unpin Sentry SDK deps (#353)
  • docs: Remove misleading documentation (#339)
  • feat: Add experimental module metadata injection (#334)
  • fix: Fix 'identifiy' typo in log messages (#341)

Work in this release contributed by @chunfeilung. Thank you for your contribution!

2.4.0

  • docs: Update instructions to install Vite plugin via pnpm (#331)
  • docs: Update minimum supported Node.js version to 14 (#327)
  • feat: Add configuration via .env.sentry-build-plugin file (#333)
  • ref: Use full git SHA for release name (#330)

Work in this release contributed by @ffxsam and @emilsivervik. Thank you for your contributions!

2.3.0

  • feat(webpack): Generate deterministic debug IDs (#321)
  • feat: Add filesToDeleteAfterUpload alias for deleteFilesAfterUpload (#313)
  • feat: Sort globbed files to ensure deterministic bundle IDs (#318)
  • fix(esbuild): Don't override user code with proxy module (#322)
  • fix(esbuild): Fix debug ID generation (#325)
  • fix: Use SENTRY_RELEASE environment variable to set release.name option (#317)

Work in this release contributed by @smbroadley. Thank you for your contribution!

2.2.2

  • fix(esbuild): Don't use namespace for esbuild proxy resolving (#311)
  • fix: Update commentUseStrictRegex to be lazy instead of greedy (#309)

Work in this release contributed by @jdk2pq. Thank you for your contribution!

2.2.1

  • fix(esbuild): Inject different debug IDs into different output bundles (#301)
  • fix(webpack): Set minimum webpack 4 peer dep to 4.40.0 (#290)
  • fix: Use magic-string appendLeft instead of replace (#303)
  • ref: Improve log message when sourcemap cannot be found (#287)

2.2.0

  • ref(core): Make better use of Sentry (#246)
  • ref(webpack): Use webpack peer dependency (#273)

Work in this release was made possible with help from @wojtekmaj and @dobladov. Thank you for your contributions!

2.1.0

  • docs: Add removal of configFile option to migration guide (#266)
  • feat: Auto detect build artifacts (#257)
  • fix(core): Ignore query and hash in filepaths for release injection (#272)
  • fix(esbuild): Use absolute path for virtual file resolving (#269)
  • fix: Don't show log message if telemetry is disabled (#267)
  • fix: Use automatic release name detection for release injection (#271)

2.0.0

Version 2.0.0 marks the official release of the @sentry/vite-plugin, @sentry/esbuild-plugin and @sentry/rollup-plugin packages. They are now considered stable.

For the @sentry/webpack-plugin this is a major release with breaking changes. Please refer to the migration guide for instructions on how to upgrade.

  • feat(core): Add deleteFilesAfterUpload option (#244)
  • feat(core): Implements rewrite sources for debug ID upload (#243)
  • fix(core): Account for undefined release name values (#251)
  • fix(webpack): Inject different debug IDs for different bundles (#242)
  • ref(core): Add new options type for future use (#216)
  • ref(core): Extract debug ID injection into separate plugins (#230)
  • ref(core): Extract debug ID sourcemap upload into a separate plugin (#231)
  • ref(core): Extract release injection into separate plugins (#218)
  • ref(core): Extract release management into a separate plugin (#232)
  • ref(core): Extract telemetry into a separate plugin (#234)
  • ref(core): Switch to v2 options (#237)
  • ref(core): Use debug ID as filename for upload (#247)
  • ref(core): Use factory function to create individual plugins (#229)
  • ref: Remove injectReleasesMap option (#236)

0.7.2

  • fix(core): Use createRequire to not use built-in require in ESM (#212)

0.7.1

  • fix(core): Fix vite complaining about CJS import of webpack-sources (#210)

0.7.0

This release introduces the sourcemaps option. This option switches to a new system of handling source maps in Sentry.

While the old system is still available via the include option, the recommended way forward is the sourcemaps option.

You can configure the sourcemaps option as follows:

plugin({
  org: "Your organization",
  project: "Your project",
  authToken: "Your auth token",

  sourcemaps: {
    // Specify the directory containing build artifacts
    assets: "./dist/**",
  },
});
  • feat(esbuild): Add debug ID injection for esbuild (#202)
  • feat: Promote debug ID uploading to stable via sourcemaps option (#204)
  • fix(core): Also do debug ID injection for .cjs files (#203)
  • fix: Add typing exports to packages (#208)

0.6.1

  • ref: Run upload preparation with maximum concurrency (#382)

0.6.0

  • feat(webpack): Add debug ID injection to the webpack plugin (#198)
  • fix(core): Don't exclude release injection module (#200)
  • ref(core): Don't interact with Sentry in watch-mode (#199)

Work in this release contributed by @hakubo. Thank you for your contribution!

0.5.1

  • fix(core): Skip all transformations for 3rd party modules

0.5.0

  • feat(core): Add injectRelease and uploadSourceMaps options (#190)
  • feat(core): Add experimental debug ID based source map upload to Rollup and Vite plugins (#192)
  • feat(core): Import release injection code from each module (#188)
  • feat: Add _experiments.injectBuildInformation option (#176)
  • feat: Add sentryCliBinaryExists function (#171)

Work in this release contributed by @alexandresoro and @dcyou. Thank you for your contributions!

0.4.0

This release contains breaking changes. Please refer to the migration guide on how to update from version 0.3.x to 0.4.x.

  • deps(core): Bump unplugin version (#164)
  • ref(core): Only inject release into entrypoints per default (#166) (BREAKING)
  • ref: Remove customHeader option (#167) (BREAKING)
  • ref: Turn default exports into named exports (#165) (BREAKING)

Work in this release contributed by @manniL. Thank you for your contribution!

0.3.0

Note: This release bumps the @sentry/cli dependency from version 1.x to version 2.x.

  • feat(core): Add headers option (#153)

Work in this release contributed by @robertcepa. Thank you for your contribution!

0.2.4

  • build(core): Update magic-string due to deprecated dependency (#146)
  • ref(core): Send project as dist in telemetry (#148)

Work in this release contributed by @jperelli. Thank you for your contribution!

0.2.3

  • fix: Exclude node_modules from release injection (#143)

0.2.2

  • feat(core): Remove server_name from telemetry events (#135)
  • fix: Add definitions in package.json for ESM resolution (#141)
  • fix(core): Finish spans when CLI commands fail (#136)
  • ref(core): Decouple breadcrumb usage from logger (#138)
  • ref(core): Don't record stack traces for telemetry (#137)

0.2.1

  • fix(core): Fix telemetry option logic (#128)
  • fix(core): Normalize id and releaseInjectionTargets in transformInclude (#132)

0.2.0

This release replaces the entries option with releaseInjectionTargets which is a breaking change from previous versions. For more information, take a look at the migration guide.

  • feat: Replace entries option with releaseInjectionTargets (#123)

0.1.0

With this release, the Sentry bundler plugins support all features of the standalone Sentry Webpack plugin. Please note that breaking changes might still be introduced.

  • Re-added Sentry CLI to the project (#85). The bundler plugins use Sentry CLI to create releases and upload sourcemaps
  • Added missing Release creation steps
    • feat(core): Add setCommits (#96)
    • feat(core): Add deploy command (#97)
  • Added validation of plugin options (#104)
  • Refined telemetry option to only send events to Sentry for projects uploading source maps to Sentry's SaaS instance (#99). For self-hosted Sentry servers, nothing will be sent to Sentry.
  • Updated README.md files with examples and option descriptions for each bundler plugin (#117)

Link to Full Changelog

0.0.1-alpha.0

This release marks the first release of the Sentry bundler blugins. This is still a heavy work in progress and a lot of things are still missing and subject to change

  • Initial release