hupe1980 / gatsby-plugin-material-ui

Gatsby plugin for Material-UI with built-in server-side rendering support
MIT License
136 stars 25 forks source link

Support styled-components #92

Open mlenser opened 2 years ago

mlenser commented 2 years ago

styled-components is an official option for MUI 5 on https://mui.com/getting-started/installation/:

MUI is using emotion as a styling engine by default. If you want to use styled-components instead, run: // with yarn yarn add @mui/material @mui/styled-engine-sc styled-components

Can styled-components be supported ny this plugin? Thanks

Talaxy009 commented 1 year ago

As this document says https://mui.com/material-ui/guides/styled-engine/

❗ Warning: Using styled-components as an engine at this moment is not working when used in a SSR projects. The reason is that the babel-plugin-styled-components is not picking up correctly the usages of the styled() utility inside the @mui packages. For more details, take a look at this issue. We strongly recommend using emotion for SSR projects.

I think it's better to use emotion.