Any plan to fix strictMode breaking source maps in metro-serializer-esbuild? #2754
-
Hey thanks for the great repo, just wanted to check if there are any plans to fix the issue of the https://microsoft.github.io/rnx-kit/docs/tools/metro-serializer-esbuild#strictmode
Unfortunately I haven't been able to find an alternative solution to using
I've also had no luck attempting to disable strict mode via Typescript or Babel (and I'm targeting hermes) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 |
Beta Was this translation helpful? Give feedback.
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.