-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
React alias for development with npm-link #393
Comments
Well.. We could probably do this although I’m not convinced it’s a great solution (what about all the other possible dependencies?) There is another solution that is more future proof in my opinion: http://stackoverflow.com/a/38818358/458193 |
This also seems to fix the problem, but... correct me if I'm wrong: npm link (without argument, on "source package", in this case React) creates link |
Not sure I understand. I’m not calling |
Sorry, my bad I've missed that you're linking in just one step.
output:
but it's equivalent to
output:
output:
Anyway, it creates global link at |
I feel like we’re going to enter a forest of subtle issues if we do this. It’s weird to treat React specially in this regard. So I’m inclined to close unless more people ask for this. |
I've been bitten by this bug too, it is quite a common use case to use |
I ended abandoning |
I ran into this using a It seems I will have to eject to add |
Please describe your use cases in #1107. Let's consolidate |
Let's say we have app called My-app managed by create-react-app and some library My-lib, being dependency of My-app. Both uses React.
Now, using npm-link gives us multiple copies of React in dependency tree, which ultimately (at least for me) ends with this error:
The only solution I've found (http://stackoverflow.com/a/31170775/2395401) was to define alias in webpack configuration like this:
Of course this means ejecting project.
Isn't it good idea to place this alias in default config?
The text was updated successfully, but these errors were encountered: