I will just cross-post it here to set it as a known-issue.
To properly use Emotion11 with xstyled we have to use importMap and create a canonical reference to notify emotion that some internals are being re-exported. Something like this
In xstyled it is not only re-exporting but also adding some new functionalities such as styled.box, the problem is that Emotion does not move the extras ahead, it only sticks to what the original Emotion instance would be able to do. I opened an issue in the emotions repo with an example of this problem.
I will just cross-post it here to set it as a known-issue.
To properly use Emotion11 with xstyled we have to use importMap and create a canonical reference to notify emotion that some internals are being re-exported. Something like this
In xstyled it is not only re-exporting but also adding some new functionalities such as
styled.box
, the problem is that Emotion does not move the extras ahead, it only sticks to what the original Emotion instance would be able to do. I opened an issue in the emotions repo with an example of this problem.https://github.com/emotion-js/emotion/issues/2412