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

Add support for react-native #134

Merged
merged 5 commits into from
Aug 10, 2018
Merged

Add support for react-native #134

merged 5 commits into from
Aug 10, 2018

Conversation

xanderberkein
Copy link
Contributor

@xanderberkein xanderberkein commented Jul 30, 2018

This package (v1.0.1) fails to initialize as a dependency of a react-native project.

I added a check that initializes deepDiff correctly when the package gets run in a react-native context.

  } else if (typeof exports === 'object' || typeof navigator === 'object' && navigator.product.match(/ReactNative/i)) {
      // Node.js or ReactNative
      module.exports = deepDiff;

@xanderberkein
Copy link
Contributor Author

xanderberkein commented Aug 2, 2018

There still seem to be some problems, I'll investigate this further

@xanderberkein
Copy link
Contributor Author

xanderberkein commented Aug 2, 2018

React-native support works now with the changes of PR 138 merged into this one. I didn't notice the other usage of root in the package.

I added a build as well, since I'm using this in my react-native app. I can remove the build again if you wish.

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

Successfully merging this pull request may close these issues.

3 participants