What are the downsides to disabling minification for release builds?

Our app has try/catch blocks that send exception details to our servers on errors and we’ve noticed that release builds have obfuscated names for things like obj.constructor.name and the componentStack in the exception. We disabled this with extraPackagerArgs --minify=false in project.ext.react in android/app/build.gradle, and this has helped a lot to investigate issues.

The Expo documentation notes that minification “will get rid of any unnecessary data (comments, formatting, unused code” but if that’s all it does, we are totally okay with the enhanced diagnostics. Are there any other downsides to disabling minification in release builds (e.g. performance, etc.)?

this is what source maps are for - tools like sentry handle symbolicating your error traces for you using the source maps. you could do the same on your service if you have the source maps available. you can get them in the postPublish hook in managed apps, or when you run expo export

expo uses metro for the bundler, which in turns users terser for minification:

1 Like

Thanks! I’ll take a look at source maps.