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 "react-native" key to package.json #181

Merged
merged 1 commit into from
Dec 18, 2016

Conversation

jgkim
Copy link
Contributor

@jgkim jgkim commented Dec 12, 2016

This resolves #180, which is related to facebook/react-native#2208.

@rtfeldman
Copy link
Owner

Thanks!

However, I don't understand why the source works but the development build fails. I'd like to understand this fix better before applying it...what is it about the development build that react native rejects it?

@jgkim
Copy link
Contributor Author

jgkim commented Dec 12, 2016

@rtfeldman Since the build files for broswers are listed in .npmignore, it cannot be found and imported in the react-native (node) environment.

@rtfeldman
Copy link
Owner

@jgkim ah, got it!

In that case, it seems like it would make more sense to fix this by removing these from .npmignore:

seamless-immutable.development.min.js
seamless-immutable.development.js
seamless-immutable.production.min.js

...and then having both react-native and browser point to the development build.

What do you think?

@jgkim
Copy link
Contributor Author

jgkim commented Dec 12, 2016

@rtfeldman I guess the react-native environment is somewhat different from the browser environment. Do you think it's appropriate for react-native to fallback to the browser field? If it's the case, why do we need to distinguish main from browser?

@rtfeldman
Copy link
Owner

Yeah maybe main should be node?

I think since we know about react-native it makes sense to include it alongside browser, just to be explicit.

@jgkim
Copy link
Contributor Author

jgkim commented Dec 13, 2016

Making it explicit is good. :) I think react-native is more similar to node rather than browser. The packager of react-native will transpile and minify the source. However, whichever case we choose, it will work. ;)

@rtfeldman
Copy link
Owner

@jgkim If you make those changes above, can you rebase on top of master? I pushed (what ought to be) a fix for Travis builds getting credentials errors on PRs.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.942% when pulling 5cd2034 on jgkim:fix/react-native into ab98236 on rtfeldman:master.

@rtfeldman rtfeldman merged commit fc83453 into rtfeldman:master Dec 18, 2016
@rtfeldman
Copy link
Owner

Thanks @jgkim!

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.

v7.0.0 seems broken in React Native environment
3 participants