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

Component/duo support, try catch? #1

Closed
evansolomon opened this issue Oct 17, 2015 · 2 comments
Closed

Component/duo support, try catch? #1

evansolomon opened this issue Oct 17, 2015 · 2 comments
Labels
🙋 no/question This does not need any changes

Comments

@evansolomon
Copy link

Can you explain the idea behind the try/catch for a module that isn't part of the package in 3eacf6a? I get that the result is that parent apps may supply their own copy of node-extend by depending on it themselves, but I can't tell why they'd want to do that. I also don't know what "component/duo support" means, and it's hard to work out what's going on just from the diff.

My use case is that I have this module in my dependency tree (via mdast) in a React Native app, and the React Native packager doesn't really love modules that cannot be resolved, so I'm trying to figure out the best way to handle this. It looks like the node-extend module is quite old and the github repo doesn't even exist anymore, so I don't particularly want to add it to my app.

Thanks.

wooorm added a commit that referenced this issue Oct 23, 2015
Instead of opting to replace when compiling to the distribution
files, this refactoring uses the `package.json`s `browser`
field. This ensures other tools adhering to that `browser`
field work.

Related to GH-1.
@wooorm
Copy link
Member

wooorm commented Oct 23, 2015

Read more about Component and Duo. Read more about installation methods for mdast in its documentation.

This work-around is needed because the extend npm module is called node-extend on GitHub (the project called node-extend on npm is never used). GitHub is used by non-npm package managers.

I have no experience with “React Native packager”. It doesn’t yet seem to support the browser field, but they seem to be working on it.

I’m closing this because I think supporting the browser field in react-native/packager is the cleanest fix for this.

An alternative is the blacklistRE found in packager

@wooorm wooorm closed this as completed Oct 23, 2015
@evansolomon
Copy link
Author

Thanks for the response. Unfortunately I don't think the blacklist option is accessible from the packager CLI. For now I fixed the issue by just adding unified v2.1.0 to the root project's dependencies.

@wooorm wooorm added the 🙋 no/question This does not need any changes label Aug 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes
Development

No branches or pull requests

2 participants