That actually doesn't let you disable - we have a seperate issue for it. However I want to understand why you want to disable sourcemaps in prod? It's still useful to have proper stack traces in your logs / error reporting isn't it?
h
Hamed Mamdoohi
11/15/2021, 12:15 AM
We do use logger and observability tools for tracing errors. I think sourcemaps can add up to the bundle size. Let me check with the team. They might have better insight as to why we have been disabling sourcemaps
t
thdxr
11/15/2021, 12:17 AM
Yeah they do add to the bundle size but we generally recommend leaving them in
thdxr
11/15/2021, 12:17 AM
We do need to support disabling them for people who ship them to an external tool like Sentry at build time
Hey @thdxr thanks for this. I spoke with the team. We are happy to keep sourcemaps as is as in prod for the reasons you pointed out. Please disregard my request here 🙏
t
thdxr
11/15/2021, 3:20 PM
Note they actually don't work out of the box right now, we have a PR open to fix that. Need to pass an env variable to NODE_OPTIONS