You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find out which procedure is actually calling to polyfill Promise
Suggestion (by @naugtur) Instead of patching RN we need to look at how they are checking the built-in promise on the global object because they shouldn't be ovewriting this.
Maybe we want to create a transform for the build package to prevent babel regenerator to put these monkey patches.
So, if RN is changing things, we could change them back!
This approach avoids patches, avoids creating a custom preset, and require us to just add a plugin at babel.config.js just after the preset.
The text was updated successfully, but these errors were encountered:
PoC
https://github.com/LavaMoat/docs/blob/main/react-native-and-ses-lockdown.md
Discussion
Even after forfeiting certain plugins, creating a custom preset the following error appears:
Tracking on which procedure is replacing the built-in promise takes us to the following chain of facts:
which calls the
Promise
polyfill atnode_modules/promise/src/es6-extensions.js
.PoC Solution
node_modules/react-native/Libraries/Core/InitializeCore.js
ommenting the line// require('./polyfillPromise');
Items of Action
Similar to #4
Promise
babel.config.js
just after the preset.The text was updated successfully, but these errors were encountered: