-
-
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
[examples] Update gatsby example to use @material-ui/* next #23089
Conversation
No bundle size changes comparing a0acea9...84f0ef8 |
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 had a look at what's done by other libraries using emotion. You have: It seems that they are closer to gatsby-theme-material-ui than gatsby-plugin-material-ui. I'm surprised that gatsby-plugin-emotion doesn't try to inline the CSS in the head as styled-components or @material-ui/styles do. |
Co-authored-by: Olivier Tassinari <[email protected]>
I am looking next on the |
I would be leaning toward waiting on authoring a custom Gatsby plugin too. The example we are editing shows how to implement most of it user land. I think that the most interesting part of our v4 Gatsby plugin is the SSR inlining. With emotion, it becomes optional. The Gatsby plugin was interesting for us because we can use it to analyze if we are doing great or not in the Gatsby environment. It would help optimize for: are people using Material-UI with Gatsby? Now, we don't have that metric with Next.js and that's probably fine. |
This PR updates the gatsby example project to use
next
version of @material-ui/* packages. It adds the @emotion/* packages and thegatsby-plugin-emotion
plugin.