Skip to content

Any plan to fix strictMode breaking source maps in metro-serializer-esbuild? #2754

Answered by tido64
BrentonWheeler asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, we currently do not have any plans to address this. Since esbuild always adds the directive when not targeting ESM, manually removing it means that we also have to adjust all the sourcemap offsets. If this is something you want to look into, we'd be happy to accept PRs.

That said, apps breaking with "use strict"; tend to be due to real bugs. In this case, one of Lottie's dependencies, react-native-safe-module, is making assumptions it shouldn't have. I can see that it was removed in a more recent version. If you can upgrade to 6.x, it should resolve the crash and also set you on a path to enable New Architecture in the future.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BrentonWheeler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants