Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set minify to false #117

Merged
merged 3 commits into from
Feb 13, 2023
Merged

fix: set minify to false #117

merged 3 commits into from
Feb 13, 2023

Conversation

hurali97
Copy link
Collaborator

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
1 participant