Sourcemaps are not used

Hey,

We’re using the devtool option with cheap-module-source-map on webpack to generate sourcemaps. I see the sourcemaps gets generated and the //# sourceMappingURL=app-d1bd2a18c63d94df9e0b.min.js.map on the bottom of my minified js file. When I see errors on sentry, I don’t get the source code with the error.

Any ideas how this can be resolved?

Thanks!

Can you share the error that sentry is showing for the event in question? It should normally give you a red error bar for an event if issues happen processing sourcemaps.

That’s the error …

That sounds like your sourcemaps are not including source contents. You would need to make your sourcemap generation tool support source contents or you can use the --rewrite flag on the sentry-cli upload command which will automatically inline sources.

My sourcemaps generation tool is webpack. Do I really need to generate it with the entire contents? If yes, what’s the real point in using cheap-module-source-map ?

Yes. All content is necessary for it to work with sentry. I’m not sure what the use of cheap sourcemaps in webpack is. I assume it provides some limited support in browser provided stacktraces but I’m not sure about that aspect of it.

Ok thanks.

When I did upload sourcemaps to sentry I got these errors:

Any idea why?