Open jantimon opened 1 week ago
if the migration to swc is successful we should add it to the swc test suite:
https://x.com/kdy1dev/status/1809491396241539113?s=46&t=ekpYTshuIMZzGwibybTgkA
and add @swc/counter as dependency
https://x.com/swc_rs/status/1808501197504151593?s=46&t=ekpYTshuIMZzGwibybTgkA
PR: https://github.com/jantimon/next-yak/pull/116/
Missing parts:
.yak.ts
imports import __styleYak from "./file.yak.module.css!=!./file?./file.yak.module.css";
)Fun Facts:
the idea for the name yak
came from @jaggli and @j7i bought https://www.galaxus.ch/en/s5/product/living-nature-highland-cow-30-cm-stuffed-animals-15800562 as mascot
I really love the image
More a comment than anything else. But why SWC instead of OXC? I remember it was said that OXC was 3x faster?
Or are there any other factors at play here?
Btw, I don't know anything about this except that I find it fascinating and watching this unfold gives me something else to look at and research later. So thanks for making it public. 🚀
Thanks for writing. It's always good to get insights from the outside world 😄
At the moment this project is aimed at users of next.js and SWC is already standard there. It's relatively easy to migrate from Babel to SWC and we have some (little) experience on how rust and the plugin system of SWC works. Whereas the transform story of OXC is not yet finished (https://github.com/oxc-project/oxc/issues/974). Correct me if I'm wrong, as we didn't look too much into the rust ecosystem for babel transpilations. An additional plus point is that @kdy1 is so easy to approach and helps without hesitation when we have questions.
But this is just a step on our way and only time will tell what happens along the way. If you see good reasons or missed opportunities please don't hesitate to write us, open tickets or try something with a new PR. We're always happy to learn more, help people and drive the ecosystem forward.
Current Status
Reasons for Transition
SWC API offers advanced capabilities:
visit_mut_children_with
Performance improvements with Rust and WASM
Right now next-yak runs before the default Next.js (SWC) compilation with babel -> leading to compiling everything twice
Open Questions
.yak
with SWCNext step: