-
Notifications
You must be signed in to change notification settings - Fork 27.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
Icomoon font will not be rendered with emotion enabled #40385
Comments
Taking a look at this. |
It breaks because if So my guess is this is introduced at compile time by |
Looking into it a little more, it seems that all those conversions in swc don't escape anything. But after some investigation and looking at related issues (emotion-js/emotion#1755, emotion-js/emotion#2802) I found #38301 which is apparently the root of the problem. Tagged template strings basically have two forms: the "cooked" one which translates escape sequences, and the "raw" one which leaves the string exactly as it appears in the source. (See here for more info.) So I think this is the line responsible:
@kdy1 Are you still working on #38301? If not I'll try making a pr that should resolve both. |
No I'm not working on it |
@rubytree33 When can we expect a fix here? Looks like it is already fixed but not merged… |
That's up to the maintainers, since I can't merge the PR myself. |
swc-project/plugins#260 should fix this issue |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Background
Since we switched to nextjs@12 we only got minified css classes on development for our
@emotion
styles.The Problem
Now we tried to enable emotion with the
compiler.emotion = true
configuration. With that emotion works well except our icomoon font.The icomoon font will be loaded and added to the styles... but not rendered. I'm not sure what the problem is exactly, for me all the things looks well.
Expected Behavior
Icons should be rendered as a font
Link to reproduction
https://github.com/dominikmatt/nextjs-emotion
To Reproduce
The text was updated successfully, but these errors were encountered: