Skip to content

Conversation

@hurali97
Copy link
Member

Description

Fixes #116

I tried to locate the source of issue in a couple of third party packages, including RN-CLI, React-Native and Metro. It turned out that recently metro has defaulted terser as their minifier. Previously, it was uglify which was playing nicely for our implemented solution to use source-map-explorer, which then uses source-map.

Now terser as a minifier for metro generates something which is probably unidentifiable for source-map. So for now, I have disabled --minify option that we can pass to RN-CLI for generating bundle and source map. With this, we can successfully visualise the source map on both dev and release. There's one downside to this approach and that's we will have artifacts generated without minification. But on a broader scale this shouldn't really matter.

For future, I will try to remove this more of a patch fix, and allow us using the minification. As I am not really much familiar with these minifier, transformers stuff, I can't promise a timeline for that, but I will try keep looking for ideas around it.

Test Plan

Ran yarn test and output is all green. 🟢 Also tested on latest RN version(0.71) and expo SDK(47).

@hurali97 hurali97 merged commit af0289c into main Feb 13, 2023
@hurali97 hurali97 deleted the fix-set-minify-to-false branch February 13, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

triggerUncaughtException with react-native 0.71.2

2 participants