问题
I'm wondering whether I can build apps with ReactJS and browserify using components that may have child component dependencies with different versions?
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.
Would a react / browserify build run into issues with this?
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, Ole
回答1:
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";
来源:https://stackoverflow.com/questions/35808349/does-reactjs-support-composed-components-with-transitive-version-conflicts