Skip to content

[MUI v7] @mui/icons-material and duplicate imports #45702

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

Closed
mbiggs-gresham opened this issue Mar 27, 2025 · 1 comment · Fixed by #45711
Closed

[MUI v7] @mui/icons-material and duplicate imports #45702

mbiggs-gresham opened this issue Mar 27, 2025 · 1 comment · Fixed by #45711
Assignees
Labels
package: icons Specific to @mui/icons regression 🐛 A bug, but worse typescript

Comments

@mbiggs-gresham
Copy link

mbiggs-gresham commented Mar 27, 2025

In our project we use eslint rules such as no-duplicate-import. In v6 you could do the following and it work perfectly fine:

import DragHandle from '@mui/icons-material/DragHandle';
import List from '@mui/icons-material/List';

In v7 this now fails the rule because it thinks both imports are the same.

node_modules/@mui/icons-material/esm/icon.d.ts' imported multiple times  import-x/no-duplicates

Is this expected? I'm assuming you can no longer do this and have to do option 2 from the guide now if you want to use rules such as these with esm? Or is there a problem with the typedefinitions?

Search keywords:

@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 27, 2025
@Janpot Janpot added typescript package: icons Specific to @mui/icons regression 🐛 A bug, but worse and removed regression 🐛 A bug, but worse labels Mar 27, 2025
@Janpot Janpot assigned Janpot and unassigned siriwatknp Mar 27, 2025
@Janpot Janpot added regression 🐛 A bug, but worse and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 27, 2025
Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: icons Specific to @mui/icons regression 🐛 A bug, but worse typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants