@emotion/cache prepend options not working in production build with Next.js
See original GitHub issueWhat package has an issue
Describe the bug
When using a custom emotion cache with option {prepend: false}
in a Next.js project, styles are still prepended
.
This only happens in a production build and on the client side.
The SSR code is correct.
reproduction repo: https://github.com/igorovic/mantine-prepend-issue
What version of @mantine/hooks page do you have in package.json?
“@mantine/hooks”: “^5.1.5”,
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/blissful-sinoussi-ry973k?file=/package.json
Do you know how to fix the issue
No response
Are you willing to participate in fixing this issue and create a pull request with the fix
No response
Possible fix
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Going to Production - Next.js
Before taking your Next.js application to production, here are some recommendations to ensure the best user experience.
Read more >Material styling not loading in production build - Stack Overflow
I've managed to solve the issue myself by first bumping these packages to their latest versions: @emotion/cache; @emtion/react ...
Read more >Getting started with MUI and Next.js - LogRocket Blog
Configuring MUI and Next.js to work together takes a bit more effort ... Inside that directory, create a file called theme.js and add...
Read more >Next.Js + MUI v5 tutorial - DEV Community
It just load the JavaScript and CSS which page really need. This will make the page loading a lot faster. All images can...
Read more >Server Side Rendering - Emotion
This approach does not work with the streaming APIs. ... import createCache from '@emotion/cache' const key = 'custom' const cache = createCache({ key...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great, thanks for investigation! I’ll see whether we can add this to emotion cache documentation.
Hi,
I managed to make it work after many trials. Here is an example repo if it could help anyone facing the same issue.
https://github.com/igorovic/mantine-prepend-issue