You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set up a minimal reproduction with Create React App configured to use SWC and @swc/plugin-emotion via craco-swc. That repo is here, and the issue can be reproduced on the main branch. Please note the issue will only be reproduced when the toolchain is run on Windows.
I have also gone ahead and fixed the issue, expect a PR from me shortly.
The text was updated successfully, but these errors were encountered:
Because

Path::file_name
andPath::file_stem
in Rust treat backslashes as part of the file stem, when@swc/plugin-emotion
is used on Windows with alabelFormat
that includes[filename]
, it will put the entire path in theclass
attribute.This causes any of the styles defined in Emotion to be ignored by the browser, because backslashes are not valid characters for a CSS class.
I have set up a minimal reproduction with Create React App configured to use SWC and
@swc/plugin-emotion
via craco-swc. That repo is here, and the issue can be reproduced on themain
branch. Please note the issue will only be reproduced when the toolchain is run on Windows.I have also gone ahead and fixed the issue, expect a PR from me shortly.
The text was updated successfully, but these errors were encountered: