'optout' mode breaks React Native
cooperka opened this issue · 1 comments
cooperka commented
Issue
When using mode optin
, everything works as expected.
When using mode optout
(see commit), the app fails to start with the error Unhandled JS Exception: ReferenceError: Can't find variable: require
. On my full app, I don't even see this error and instead it simply shows an empty white screen that never loads.
Unfortunately I don't have time right now to diagnose this in much detail, but I've created a demo project to test the behavior.
Demo
I have a demo project here showing this issue in action.
cooperka commented
Tested again with optout
as of React Native v0.42.3 and it now works fine! Closing. Here's my full .babelrc
for reference:
{
"presets": [
"react-native-stage-0/decorator-support"
],
"plugins" : [
["extensible-destructuring", { "mode": "optout", "impl": "immutable" }]
]
}