0

I've read some article or question said "sourcemap will be downloaded only when devtool is opened"

When do browsers download sourcemaps?

https://css-tricks.com/should-i-use-source-maps-in-production/

There's no hit on performance (source maps don't get loaded unless you have DevTools open

But, I am using a tool called Sentry, and it call show me the original error with original code call stacks when it receives errors

So what is the actual behavior when we ship sourcemap file and open the webpage inside mobile browser ?

Littlee
  • 3,791
  • 6
  • 29
  • 61

1 Answers1

0

I believe the answer lies in how your Sentry tool was coded. Each browser documents how it handles the retrieval of source maps. Some have it as a configurable item. It does make sense to only download it if/when you open DevTools. But some tools might decide to download them ahead of time. For example if your Sentry tool is a debug tool, it would make sense to always get the sourcemaps asap instead of waiting for you to do anything special to get them (if it's a debug tool, it shouldn't wait to get them). So, I think the answer is to look at the Sentry documentation.

Pierre
  • 2,335
  • 22
  • 40