Skip to content

[internal] Bundling vs dependencies #38

Description

@oliviertassinari

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalBehind-the-scenes enhancement. Formerly called “core”.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions