-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[code-infra] Update package layout for better ESM support #43264
Conversation
Netlify deploy previewhttps://deploy-preview-43264--material-ui.netlify.app/ Menu: parsed: +3.73% , gzip: +3.83% Bundle size reportDetails of bundle changes (Toolpad) |
The pigment app has been very useful as an integration test, so I don't want to just rip it out. I'm adding a version of it with pigment removed which can serve as the integration test for now. We can remove once the issues are resolved. wdyt? |
Yeah. That works as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏼
I left two nit comments.
@Janpot may I ask you to create an issue so we can track the debugging of the Pigment Next App issue? That way, we could add it to the backlog to avoid forgetting about it.
Added in the pigment css repo: mui/pigment-css#376 |
addresses #44055
addresses #43980
addresses #44265
addresses #44180
addresses #44993
addresses #45018
Might close:
Add a new mode to the build:
Notes:
@mui/joy/node
bundle is included in the client bundle when Joy UI component is being imported into a RSC #37934To Do:
figure out theBlocked on [core] Removeexport *
usage in files that have a'use client'
pragma.'use client'
from index files and useAutocomplete reexport #41956@mui/material-pigment-css
@mui/material-pigment-css
and@mui/icons-material
esmExternals
from the docs (investigate) [docs] Remove esmExternals from the docs #43068Bundle size increase
The bundle size increase can be fully attributed to the inclusion of the following ESM/CJS interop helper in the webpack output:
Code
This is caused by the following import
material-ui/packages/mui-system/src/useMediaQuery/useMediaQuery.ts
Line 75 in eab1b9e
A potential switch to using
use-sync-external-store
has been explored in #43476 but ultimately it makes sense to keep it, it manifests in the webpack runtime.Resolutions
To try out the changes use following resolutions: