tradle / rn-nodeify

hack to allow react-native projects to use node core modules, and npm modules that use them
MIT License
620 stars 112 forks source link

How does this work? #30

Closed parshap closed 7 years ago

parshap commented 7 years ago

Can you give a rundown of what happens when you run rn-nodeify? I understand it changes your top-level package.json, but what is actually using the browser and react-native keys? And it seems to make changes to files inside node_modules/ as well?

mvayngrib commented 7 years ago

@parshap you're right to ask, and it's long overdue. I just added some words to the readme, see if that clears things up.

parshap commented 7 years ago

Excellent -- thanks!

Seems like even running without --hack changes the package.json files and --hack only controls the package-specific changes.

So what exactly is using the browser and react-native keys inside package.json files? Is this built into React Native Packager?

mvayngrib commented 7 years ago

Yes, the browser and react-native fields are something the react native packager respects. It didn't support it out of the box, I had to submit a PR. It is a field respected by webpack and browserify too.

You're prob right about --install, I'll check and update the readme. Or feel free to submit a PR!

On Fri, Feb 17, 2017 at 7:23 PM Parsha Pourkhomami notifications@github.com wrote:

Excellent -- thanks!

Seems like even running without --hack changes the package.json files and --hack only controls the package-specific changes.

So what exactly is using the browser and react-native keys inside package.json files? Is this built into React Native Packager?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mvayngrib/rn-nodeify/issues/30#issuecomment-280802710, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFH7LG8J3KYn-mffFy9CjzLRJGX6OYBks5rdjn0gaJpZM4ME050 .

-- Mark Vayngrib CTO & Co-founder http://tradle.io http://github.com/tradle http://github.com/mvayngrib US: +1 (201) 925-6626

mvayngrib commented 7 years ago

closing due to inactivity. I think the README explains things decently well