Closed kirillzyusko closed 5 months ago
Avoid deep worletization of react-native package.
react-native
It looks like in specific project setup babel plugin may try to serialize entire react-native package (see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 for more context).
To avoid that in this PR I'm extracting Platform.OS into separate OS variable, so that babel plugin will capture only value of OS (and not entire Platform object).
Platform.OS
OS
Platform
Closes https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 and https://github.com/kirillzyusko/react-native-keyboard-controller/issues/294
Tested in the project where this error occurs.
Thanks @arekkubaczkowski for catching and finding/testing the fix 😊
📜 Description
Avoid deep worletization of
react-native
package.💡 Motivation and Context
It looks like in specific project setup babel plugin may try to serialize entire
react-native
package (see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 for more context).To avoid that in this PR I'm extracting
Platform.OS
into separateOS
variable, so that babel plugin will capture only value ofOS
(and not entirePlatform
object).Closes https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 and https://github.com/kirillzyusko/react-native-keyboard-controller/issues/294
📢 Changelog
JS
Platform.OS
into separateOS
variable🤔 How Has This Been Tested?
Tested in the project where this error occurs.
📝 Checklist