-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[system] Make createBreakpoints
independent for stringify theme
#43048
Conversation
Netlify deploy previewhttps://deploy-preview-43048--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
c93fbb8
to
ace922b
Compare
createBreakpoints
independent for stringify themecreateBreakpoints
independent for stringify theme
@@ -50,7 +50,7 @@ export { default as createStyled } from './createStyled'; | |||
export * from './createStyled'; | |||
export { default as styled } from './styled'; | |||
export { default as createTheme } from './createTheme'; | |||
export { default as createBreakpoints } from './createTheme/createBreakpoints'; | |||
export { default as createBreakpoints } from './createBreakpoints/createBreakpoints'; |
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.
Do we want this in the top level export? I'd say let's keep it at path level.
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.
I think we need to keep it like this otherwise it's a breaking change which is out of scope of this PR.
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.
Left one comment. Rest looks good.
Issue
Emotion is still bundled even though it is not used. The image below is a Next.js app with bundle analyzer:
Thanks to @brijeshb42, he found out that the root cause comes from the import in the stringifyTheme:
Solution
Moved
createBreakpoints
into its own folder (in system) and reexport it asunstable_createBreakpoints
because we just need it for internal integration.Result:
Bye Emotion.