sentry-javascript-bundler-plugins
sentry-javascript-bundler-plugins copied to clipboard
Webpack plugin uploads source maps on development mode
Environment
Using sentry/browser version 7.109.0 and sentry/webpack-plugin version 2.16.1.
Steps to Reproduce
- Create a very minimal JS app and add webpack to it
- Set up Sentry's SDK and the sentry webpack plugin according to the docs
- Run the app with
webpack --watch --mode developmentOR setmode:“development”,in webpack'smodule.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.
Backlogging this!
As a workaround you can set disable: true for when you do dev builds.
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)
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.