是否ReactJS支持组成成分以及传递版本冲突? [英] Does ReactJS Support Composed Components With Transitive Version Conflicts?
问题描述
我不知道我是否可以建立ReactJS应用程序和使用browserify组件都可能有子组件的依赖不同版本?
I'm wondering whether I can build apps with ReactJS and browserify using components that may have child component dependencies with different versions?
例如,假设组件A和B使用。组件A依赖组件C:1.0.2和B组取决于成分:C:2.0.5
For example suppose component's A and B are used. Component A depends on component C:1.0.2 and component B depends on Component C:2.0.5.
请问一个反应/ browserify共建碰到这个问题?
Would a react / browserify build run into issues with this?
我很好奇的原因是,该聚合物注册表不支持具有版本冲突传递依赖:
https://github.com/Polymer/polymer/issues/326
The reason I'm curious is that the Polymer registry does not support transitive dependencies that have version conflicts: https://github.com/Polymer/polymer/issues/326
TIA,
奥莱
TIA, Ole
推荐答案
还没有测试案例,但我会认为其可能。捆绑或进口时,我会注意的变量覆盖。
Don't have a test case for it but, I would assume that its possible. I would watch out for variable overrides when bundling or importing.
// Component A
import C as C from "/path/to/module";
//Component B
import C as C-2 from "/path/to/module.2";
这篇关于是否ReactJS支持组成成分以及传递版本冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!