-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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] Add example to alias styled-components with Next.js #27087
Comments
Created draft PR to demonstrate the issue and hopefully provide a helpful example once it's resolved. |
@hboylan Great initiative, we talked about doing this in #6115 (comment). |
Thanks, I'm glad this is on the community's radar. It's also reassuring to see the performance results you mentioned there. |
I'm still having this issue, even trying the #27088 . Do someone has a different solution? |
@LucasBassetti same here. Hope to fix it soon. What I tried so far can be consulted here. |
@LucasBassetti I made some changes (like including this) and now it's working as expected. It has some delays when I navigate between index and about pages (maybe not a true SPA navigation, but a back-end one), but as it's a new project, I'll look at it later. I hope it helps you! |
Coming back because I had one issue: actually I had to install '@emotion/react' and '@emotion/styled' packages to make jest run properly. I don't know how to solve it. Apart from that, everything seems fine. |
Hi there, chiming in because I'm facing the same problem and can't seem to solve it I cannot run the without installing MODULE_NOT_FOUND errors are thrown server side I thought just running the example should work any insight on this? thanks |
Current Behavior 😯
Setting the webpack alias to target styled-components does not work for nextjs.
Full stack
Expected Behavior 🤔
Webpack alias should replace
@material-ui/styled-engine
with styled-components version.Steps to Reproduce 🕹
Steps:
theme.ts
:_document.tsx
:_app.tsx
:Context 🔦
Trying to upgrade NextJS app from MUI v4 to v5 using styled-components instead of emotion.
I'd like to add an example for this solution once I get it working. Something like
material-ui/examples/nextjs-with-styled-components-typescript
Your Environment 🌎
`npx @material-ui/envinfo`
The text was updated successfully, but these errors were encountered: