Skip to content

[Perf] Unnecessary bundle bloat caused by full Mui dependencies #3

@cyio

Description

@cyio

These MUI packages introduce a large amount of unnecessary code into downstream projects, mainly because the icon package is imported as global dependency. As a result, my final index.js increased by more than 1 MB even after gzip.

Image

Root cause:

"@mui/icons-material": "^5.10.9",
"@mui/material": "^5.15.10",
"@mui/system": "^5.15.9"

They are also required as peer dependencies in the widely used identity-react library:

"@mui/icons-material": ">=5.0.0",
"@mui/material": ">=5.0.0"

https://github.com/bsv-blockchain/identity-react

This effectively forces projects to include the full MUI bundle — even if only a tiny portion is needed, especially the icons.

Possible mitigation:
Import only the components or icons you actually need, or replace the MUI icon set with lighter, on-demand alternatives. This helps avoid pulling in the entire icon library globally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions