-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
twin.macro errors when moving from Babel to SWC #664
Comments
Sadly twin.macro doesn't support SWC #516 (comment) |
Exactly. Just wanted to note it, in hopes of it happening someday. |
Yep big job supporting SWC Stuart - we'd need babel-plugin-macros written in Rust and then twin would need to be decoupled (split into different packages) from babel. Thinking we're more likely to get an ESBuild plugin at this stage. Closing in favor of the existing discussion |
I've updated the twin examples with a new workaround that'll keep SWC enabled - ref |
@ben-rogerson that deserves some celebration 🙌 |
Thanks for this @ben-rogerson, just what I needed! The link above didn't work as expected though, here's the correct links: I spent an hour wondering why my config wasn't working when I was trying to use the JS example rather than the TS one, hopefully someone can avoid repeating my ineptitude and pain 🤦🏻♂️ |
Something I ran into when upgrading to Next.js 12 which is moving from Babel to SWC. It seems that emotion and styled-components are being ported, but twin.macro doesn't seem to work. Not sure what the issue is, as I don't really understand what moving from Babel to SWC means
The line in my
./pages/_app.tsx
is:After removing this I was also seeing errors with twin.macro's
theme
:The text was updated successfully, but these errors were encountered: