-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Compile react-native-
node modules
#1626
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
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact [email protected] if you have any questions. |
Filled out the CLA |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Any reason this can't be merged in? |
Hey, sorry this was neglected. Basically, I don‘t think we’ll go this way. I know this is how RN ecosystem works, but their decision to publish uncompiled modules is somewhat baffling to me, as this creates an implicit dependency on the Babel preset shipping with RN. For example, we can’t just enable our Babel preset for |
Thanks for the explanation! Hopefully there will be a web/RN solution out there eventually. :P |
Yea.. 😭 |
Might be a bad place to post this, but what's stopping create-react-app from using the same babel preset as react-native? |
Right now people using this with react-native-web are unable to use any pure JS react-native modules becuase they usually use ES6 and JSX.
React-native's build tool passes all their modules through babel to let module authors use "the latest and greatest" in JS syntax. This tool. however, doesn't compile modules due to performance costs that that would incur.
Many react-native components seem to have names that start with
react-native-
. I think that a good compromise would be to compile these modules, this enabling react-native-web projects to use this tool to get up and running instantly without needing to eject in order to use dependencies, while at the same time having no real effect on existing projects that don't make use ofreact-native-web
Currently react-native-web is missing the easy to use tooling that's provided with react-native. This change could bring react-native-web development to about the same level and enable people to build hybrid projects faster.
I've currently got this running with react-native-vector-icons and am planning on using many more as time progresses.