mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.37k stars 32.14k forks source link

icon import issue. Some icons affected #43819

Open lcfr-dev opened 9 hours ago

lcfr-dev commented 9 hours ago

Steps to reproduce

No response

Current behavior

Hi, the issue come up only with the version 6.1.0 but was not present in the preview version 6.0.2. Even the version 6.1.1 (last release) not solve the problem I had the issue the NavigateBefore and NavigateNext but not with DoNotDisturb The returned error is Resolving to directories is not possible with the exports field (request was ./)

I use the following code in same file

import { DoNotDisturb } from '@mui/icons-material/';                 // working
import { NavigateNext } from '@mui/icons-material/';                 // not working
import NavigateBefore from '@mui/icons-material/NavigateBefore';     // not working

Thanks a lot for your awesome work

Expected behavior

Context

No response

Your environment

npx @mui/envinfo ``` System: OS: Linux 6.11 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat) Binaries: Node: 22.8.0 - ~/.nvm/versions/node/v22.8.0/bin/node npm: 10.8.3 - ~/.nvm/versions/node/v22.8.0/bin/npm pnpm: 9.10.0 - ~/.nvm/versions/node/v22.8.0/bin/pnpm Browsers: Chrome: 129.0.6668.58 npmPackages: @emotion/react: ^11.13.3 => 11.13.3 @emotion/styled: ^11.13.0 => 11.13.0 @mui/base: 5.0.0-beta.40 @mui/core-downloads-tracker: 6.1.1 @mui/icons-material: ^6.1.1 => 6.1.1 @mui/joy: ^5.0.0-beta.48 => 5.0.0-beta.48 @mui/material: ^6.1.1 => 6.1.1 @mui/private-theming: 6.1.1 @mui/styled-engine: 6.1.1 @mui/system: 6.1.1 @mui/types: 7.2.17 @mui/utils: 6.1.1 @types/react: 18.3.5 react: ^18.3.1 => 18.3.1 react-dom: ^18.3.1 => 18.3.1 typescript: 4.9.5 ```

Search keywords: icons

oliviertassinari commented 3 hours ago

It looks like it's about #43624. The error you have is coming from https://github.com/webpack/enhanced-resolve/blob/72999caf002f6f7bb4624e65fdeb7ba980b11e24/lib/ExportsFieldPlugin.js#L78.