JavaScript SourceMap is not used

Ok so I resolved the issue with some help from Sentry support. There was a bit of a terminology confusion, when referring to “naming your sourcemap”. This is referring to the name of the sourcemap as a Sentry artifact, not how it is named in in the sourceMappingURL directive. So the solution should look like this:

File hosted at:
https://example.com/static/da94f5ffc8cff78aca266ed057cc823a53d460a3/js/main.js

Directive in file:
//# sourceMappingURL=main.js.map

Artifact name in sentry:
~/static/da94f5ffc8cff78aca266ed057cc823a53d460a3/js/main.js.map

The artifact name was what took some time to understand. We use the sentry-cli tool, which also needs a bit of explaination. You can use upload-sourcemaps like this to get it named right in the release artifacts:

sentry-cli [.....] upload-sourcemaps --url-prefix "~/static/da94f5ffc8cff78aca266ed057cc823a53d460a3/js/" /dist/main.js.map

Hope someone finds this useful.

-Jon