Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: prevent removing globalEvalWithSourceUrl in RELEASE builds (fac…
…ebook#34319) Summary: Expo Go was using `nativeInjectHMRUpdate` for [snack](https://snack.expo.io/) to provide stack traces to OTA errors. `nativeInjectHMRUpdate` was replaced with `globalEvalWithSourceUrl` [here](facebook@71c84cf). The issue with `globalEvalWithSourceUrl` is that it is stripped in RELEASE builds, and Expo Go is installed via the App Store, making it a release build. I propose we keep the method, `eval` is still exposed in production so there's no increase in security risk, simply provides a better DX for multipurpose development clients. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Added] - Expose `globalEvalWithSourceUrl` in production builds. [iOS] [Added] - Expose `globalEvalWithSourceUrl` in production builds. Pull Request resolved: facebook#34319 Test Plan: - Function should be available as `global.globalEvalWithSourceUrl` in a production build. Reviewed By: christophpurrer Differential Revision: D38312111 Pulled By: motiz88 fbshipit-source-id: adcd83ad1103c8fd4c6d5d7aec765f27881e0432
- Loading branch information