[core] Flatten imports to speed up webpack build & node resolution #10354
Labels
component: charts
This is the name of the generic UI component, not the React module!
component: data grid
This is the name of the generic UI component, not the React module!
component: pickers
This is the name of the generic UI component, not the React module!
component: tree view
TreeView, TreeItem. This is the name of the generic UI component, not the React module!
core
Infrastructure work going on behind the scenes
performance
Summary 💡
Same as mui/material-ui#35840 but for MUI X.
We also miss an eslint rule to fail the build, but this is likely missing from the main eslint configuration, so a bit outside of the scope of X.
Examples 🌈
We should be able to import deep in:
mui-x/packages/grid/x-data-grid/src/hooks/features/sorting/useGridSorting.ts
Line 2 in 8757e19
mui-x/packages/x-date-pickers/src/DateTimePicker/dateTimePickerTabsClasses.ts
Line 4 in 8757e19
mui-x/packages/x-charts/src/ChartsAxis/axisClasses.ts
Line 4 in 8757e19
Motivation 🔦
It was raised in #10215.
Note that https://www.notion.so/mui-org/mui-utils-purpose-9a9fc9da3a004864b6c4e1f4d1f24f95 is a different problem/discussion. But regardless of either we import from base or utils, barrel imports shouldn't happen.
cc @romgrk maybe the type of performance topics you enjoy 😁. It's not about runtime performance though, mostly in dev mode.
The text was updated successfully, but these errors were encountered: