Webpack 5.110.2 causes @mui/utils/chainPropTypes to be reported as having no default export
#21883
Unanswered
FrozenSamurai
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Question
After upgrading Webpack from 5.110.1 to 5.110.2, my React application fails to build with the following error:
The application was building successfully with Webpack 5.110.1.
Environment
{ "@mui/icons-material": "^5.10.16", "@mui/material": "^5.10.17", "@mui/styles": "^5.11.2", "react": "^17.0.2", "webpack": "5.110.2" }The relevant MUI packages are relatively old (v5.x), and I suspect this may be related to how Webpack 5.110.2 handles ESM exports/re-exports or detects missing default exports.
For example,
@mui/utilsexposeschainPropTypesas a default export in its package entry point:However, with Webpack 5.110.2, the build reports that
@mui/utils/chainPropTypesdoes not contain a default export.What changed
The only significant change between the working and failing builds is the Webpack version:
I also verified that the same application and MUI dependency versions work when Webpack is pinned back to 5.110.1.
Questions
Additional information
I can provide a minimal reproduction repository if required.
At the moment, the workaround is to pin Webpack to:
{ "webpack": "5.110.1" }I'd like to understand the underlying compatibility issue before relying on a Webpack version override as a long-term solution.
All reactions