sentry-javascript-bundler-plugins icon indicating copy to clipboard operation
sentry-javascript-bundler-plugins copied to clipboard

Webpack plugin uploads source maps on development mode

Open InterstellarStella opened this issue 1 year ago • 3 comments

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.

InterstellarStella avatar Apr 11 '24 10:04 InterstellarStella

Backlogging this!

lforst avatar Apr 15 '24 09:04 lforst

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

lforst avatar Apr 15 '24 09:04 lforst

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)

rabbiveesh avatar Aug 12 '24 11:08 rabbiveesh

As a workaround, setting sourcemaps.disable to true should now work (see https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/587).

Backlogging the dev mode improvement.

andreiborza avatar Dec 10 '24 08:12 andreiborza