In its current form, the released packages bundle code instead of relying on a nested dependency tree.
For instance:
- The
@material-ui/x package bundles @material-ui/x-license & @material-ui/x-grid & @material-ui/x-tree-view
- The
@material-ui/x-grid package bundles @material-ui/x-grid & @material-ui/x-license
- The
@material-ui/x-tree-view package bundles @material-ui/x-tree-view & @material-ui/x-license
I can't help myself asking, wouldn't it be better to leverage transitive dependencies? In this mode, we would get this tree structure:
@material-ui/x
├── @material-ui/x-grid
│ └── @material-ui/x-license
└── @material-ui/x-tree-view
└── @material-ui/x-license
Which can avoid duplicates in developer's bundle when they start to do fancy stuff, like importing from @material-ui/x and @material-ui/x-tree-view at the same time.
In its current form, the released packages bundle code instead of relying on a nested dependency tree.
For instance:
@material-ui/xpackage bundles@material-ui/x-license & @material-ui/x-grid & @material-ui/x-tree-view@material-ui/x-gridpackage bundles@material-ui/x-grid & @material-ui/x-license@material-ui/x-tree-viewpackage bundles@material-ui/x-tree-view & @material-ui/x-licenseI can't help myself asking, wouldn't it be better to leverage transitive dependencies? In this mode, we would get this tree structure:
Which can avoid duplicates in developer's bundle when they start to do fancy stuff, like importing from @material-ui/x and @material-ui/x-tree-view at the same time.