getsentry / sentry-javascript-bundler-plugins

JavaScript Bundler Plugins for Sentry
https://sentry.io
BSD 3-Clause "New" or "Revised" License
133 stars 34 forks source link

Webpack plugin uploads source maps on development mode #520

Open InterstellarStella opened 6 months ago

InterstellarStella commented 6 months ago

Environment

Using sentry/browser version 7.109.0 and sentry/webpack-plugin version 2.16.1.

Steps to Reproduce

  1. Create a very minimal JS app and add webpack to it
  2. Set up Sentry's SDK and the sentry webpack plugin according to the docs
  3. Run the app with webpack --watch --mode development OR set mode:“development”, in webpack's module.exports.

Expected Result

Source maps are not uploaded to Sentry, as stated in the docs:

The Sentry webpack plugin doesn't upload source maps in watch-mode/development-mode. We recommend running a production build to test your configuration.

Actual Result

Source maps are uploaded to Sentry.

lforst commented 6 months ago

Backlogging this!

lforst commented 6 months ago

As a workaround you can set disable: true for when you do dev builds.

rabbiveesh commented 2 months ago

This is still very broken - even setting sourcemaps.disable to an explicit true still results in the sourcemaps being uploaded in dev mode (using the vite plugin)