-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Unstyled UI shows up on the first load. CSS is not loading properly on production build #32770
Comments
Can confirm this is indeed not working 😢 |
I tried to go a bit deeper on this and the only thing I found out is that const initialProps = await Document.getInitialProps(ctx);
const emotionStyles = extractCriticalToChunks(initialProps.html); This is caused by React 18. With React 17 I will open a ticket with next js. |
Turns out opening an issue won't be needed. This is indeed an issue with next. It's fixed on Next version |
This can be closed. See vercel/next.js#36915 (comment) Related PR: vercel/next.js#36792 And related issue already reporting this: vercel/next.js#36675 (comment) |
@PupoSDC @balazsorban44 Thanks a lot for the quick response! Can confirm it works with the |
Duplicate of #30410 |
I upgraded from v12.0.10 to v12.1.7-canary.39 and I still have this issue happening, anybody can help? |
Duplicates
Latest version
Current behavior 😯
Unstyled UI shows up on the first load when using material ui examples nextjs-with-typescript or nextjs stackblitz
This also happens within my own project with the latest packages versions.
Expected behavior 🤔
Ui is loaded with styles on the first load.
Steps to reproduce 🕹
Steps:
Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: