Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with react-navigation library #188

Open
serhiipalash opened this issue Aug 23, 2019 · 0 comments
Open

Doesn't work with react-navigation library #188

serhiipalash opened this issue Aug 23, 2019 · 0 comments

Comments

@serhiipalash
Copy link

serhiipalash commented Aug 23, 2019

Hi @oliviertassinari ! Thank you for such a great plugin! It makes our app much more performant in production.

Unfortunately, it doesn't work with latest version of react-navigation library or maybe library doesn't work with your plugin. I am not sure on what side the issue is.

Once you add babel-plugin-transform-react-remove-prop-types plugin in the project, which uses react-navigation code, the build fails with error TypeError: undefined is not an object (evaluating '_getPrototypeOf2.default').

Simulator Screen Shot - iPhone 6s - 2019-08-24 at 00 30 30

But react-navigation doesn't have any prop-types in its code and the real problem is that their source code is already compiled with Babel to something like this

Screen Shot 2019-08-23 at 9 26 08 PM

They use bob package for building their sources https://github.com/react-native-community/bob

Adding react-navigation to ignoreFilenames config option doesn't help.

react-navigation is a very popular library and it is often used with Expo framework. Can you investigate what is wrong and where?

Here is the test repo where you can test the bug https://github.com/serhiipalash/test-transform-react-remove-prop-types/commits/master . If you don't have phone simulator installed on your pc, you can do

npm install -g expo-cli
expo start --tunnel

and open the project on your real device by screenshoting QR-code, displayed in Terminal, with Expo mobile app

@serhiipalash serhiipalash changed the title Doesn't work with react-navigation library in node_modules Doesn't work with react-navigation library Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant