Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Bundling vs dependencies #38

Closed
oliviertassinari opened this issue Jun 26, 2020 · 2 comments · Fixed by #339
Closed

[core] Bundling vs dependencies #38

oliviertassinari opened this issue Jun 26, 2020 · 2 comments · Fixed by #339
Labels
core Infrastructure work going on behind the scenes
Milestone

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 26, 2020

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.

@oliviertassinari oliviertassinari added this to the Post MVP milestone Jun 26, 2020
@oliviertassinari
Copy link
Member Author

I strongly think that we should remove duplication to leverage the npm dependency tree. For instance, Kendo-UI: https://npm.anvaka.com/#!/view/2d/%2540progress%2Fkendo-react-dropdowns.

@oliviertassinari oliviertassinari added the core Infrastructure work going on behind the scenes label Sep 7, 2020
@oliviertassinari oliviertassinari changed the title Bundling vs dependencies [core] Bundling vs dependencies Sep 18, 2020
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Apr 1, 2022

@flaviendelangle Solved this issue in the end. @mui/x-data-grid-pro depends on @mui/x-data-grid. Proof: https://unpkg.com/browse/@mui/x-data-grid-pro@5.7.0/package.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant