Open deanshub opened 5 years ago
@ronenst that's exactly my point, I moved react
and react-dom
from dependencies to dev-dependencies.
I have an issue that a project of mine that I'm upgrading to react 16, uses a dependency that uses this project, when I'm installing dependencies it installs react 15 because it's a regular dependency and not dev which causes an error of conflicting react versions (https://github.com/facebook/react/issues/10320#issuecomment-318754280)
once moving these dependencies to dev-dependency they won't be installed and the react will come from the parent's dependency which makes more since since this is a library and not a project
Do you have react
and react-dom
defined as externals
? That may solve it but you'll need to inject them via script tags.
What worries me is that this change could potentially break projects which don't install React themselves. Even if it is more correct that could be a problem.
Our team can try upgrading the version though, I think that should also solve your issue?
I have a workaround, just thought it would be better to move it here as-well
Okay, thanks, we'll discuss internally.
@deanshub Can you explain the reason for this change?
I don't think it's correct and we've had problems with code like this before. An angular project for example should be able to import and define an
AngularLazyComponent
without having to explicitly import react.We do need to update the version though...