Replies: 7 comments 25 replies
-
Some pretty awesome tech for sure - here's my recent response on it: |
Beta Was this translation helpful? Give feedback.
-
Looks like swc is planning to scrap the existing plugin api in favor of a rust-based one in v2 (they're currently at v1.2.81 and I'm unsure how long away they are from a v2 release):
|
Beta Was this translation helpful? Give feedback.
-
There is a performance issue need to be solved: swc-project/swc#2175 |
Beta Was this translation helpful? Give feedback.
-
FYI, plugin api for SWC now released: https://twitter.com/swc_rs/status/1492454606118752257 |
Beta Was this translation helpful? Give feedback.
-
Hi all (cc @ben-rogerson) I have been maintaining a plugin for 'native' SWC. It is now in a pretty good space as I've mainly been prototyping with it but it works out of the box using next.js 13.0.1 and their swc plugin api and I'm very happy with the speed so far (10x or so). See here: I have deliberately not bothered going down the babel-plugin-macros route as I was interested in seeing how feasible a pure-rust solution would be. It currently leans on the swc emotion / styled-components plugin, and transpiles all the tailwind styles to css directives. See this discussion for a roadmap arlyon/stailwc#2 |
Beta Was this translation helpful? Give feedback.
-
We're also pining for a SWC solution -- @arlyon are you putting any energy into stailwc? Seems really promising... I also wanted to ask about a workaround that was posted a while back: https://github.com/c-rick/next-twin from @c-rick And the same solution for emotion https://github.com/atxiii/next-twin-swc-emotion (blog post: https://blog.mrcatdev.com/how-to-config-nextjs-for-babel-plugin-macros-like-twinmacro-without-disabling-swc-compiler) from user @atxiii. Is this a potentially viable interim solution until someone figures out how to rearchitect Twin for Rust? I haven't had any luck with it yet, but I'm on Next 13 which might make a difference. I get |
Beta Was this translation helpful? Give feedback.
-
Would be awesome to have this! Might be easier to achieve now that there is an official [@swc/plugin-styled-components](https://github.com/swc-project/plugins/tree/main/packages/styled-components plugin), should give a pretty good insight of what a future swc for twin.macro would look like. Any work started on this or not yet? |
Beta Was this translation helpful? Give feedback.
-
SWC is a more-performant Babel replacement written in Rust. Next.js is already providing support for it.
Here is the tracking issue for
babel-plugin-macros
support: kentcdodds/babel-plugin-macros#144Beta Was this translation helpful? Give feedback.
All reactions