I’m having unusual difficulty getting sourcemaps to work with my project. I’ve been reading through the docs and forum comments, but can’t quite figure out what (if anything) I’m doing differently here.
I’m developing locally, and using webpack-sentry-plugin to automatically upload my sourcemaps during a build:
config.devtool = 'source-map'
config.plugins = [
...,
new SentryPlugin({
organisation: process.env.SENTRY_ORGANIZATION,
project: process.env.SENTRY_PROJECT_NAME,
apiKey: process.env.SENTRY_API_KEY,
release: function () {
const version = require('../package.json').version;
return version;
},
suppressErrors: true
})
The source file includes the sourceMappingUrl comment, which is set as a relative reference to the map file:
//# sourceMappingURL=app.bundle.js.map
During build, both the map and source files are uploaded to the correct release, prefixed with the tilde (~
) character to indicate a relative path:
However, all subsequent error events still contain references to the minified code. I’ve validated the sourcemaps both locally and via sourcemaps.io, so I’m a bit baffled at what’s potentially going wrong here.
I have yet to try uploading with sentry CLI, but I can’t seem to get it to authenticate probably (even on a token with full permissions granted). However, this seems like a separate topic.
I was able to get Sentry CLI to upload my sourcemaps (with the rewrite
option), but unfortunately I get the same results
Is there something that I’m missing here?