@emotion/[email protected] CacheProvider issue #218
-
Hi, I have noticed a weird issue that I am having with my project when I update my packages to latest versions. If I substitute the CacheProvider with TssCacheProvider, it works again. I assume something must've changed in the package @emotion/react package. Is the recommended usage to always use TssCacheProvider? Update: Nevermind, TssProvider doesn't work, the page loads but I get client side issues with the className not matching. It seems to cause the crash because I use:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 18 replies
-
Hello @simplecommerce, |
Beta Was this translation helpful? Give feedback.
-
Thank you for the detailed reproduction, @simplecommerce. I can confirm that this is indeed a bug. Although I can't resolve it directly on my end, I'll take the necessary steps to ensure the issue is addressed upstream. For context, this is related to the infamous dual package issue, which occurs when bundlers incorrectly determine which distribution of a module should be loaded. Previously, a PR on Vite was required to fix a similar occurence of the same issue: vitejs/vite#13370 Since it may take some time for the issue to be fully resolved, I recommend using Emotion 11.12 as a workaround in the meantime. |
Beta Was this translation helpful? Give feedback.
-
Just an update, I haven't forget about this and still plan on fixing it. I just need to allocate some hours to it. |
Beta Was this translation helpful? Give feedback.
-
@garronej I had a quick question, I didn't want to open a new discussion just to ask this, it's related to the modern API. I followed the instructions in the setup and for some reason the At first I thought it was in my project, so I used the same repo in this discussion to test with version 11.12.0 of @emotion/react.
This always says undefined, I don't know why. |
Beta Was this translation helpful? Give feedback.
-
Resolution can be tracked here: emotion-js/emotion#3267 |
Beta Was this translation helpful? Give feedback.
-
The issue has been confirmed it's coming from Vike. |
Beta Was this translation helpful? Give feedback.
Thank you for the detailed reproduction, @simplecommerce.
I can confirm that this is indeed a bug.
Although I can't resolve it directly on my end, I'll take the necessary steps to ensure the issue is addressed upstream.
For context, this is related to the infamous dual package issue, which occurs when bundlers incorrectly determine which distribution of a module should be loaded.
Previously, a PR on Vite was required to fix a similar occurence of the same issue: vitejs/vite#13370
Since it may take some time for the issue to be fully resolved, I recommend using Emotion 11.12 as a workaround in the meantime.