js-lingui
js-lingui copied to clipboard
Support for SWC
We just dropped bable in favor of SWC but it seems Lingui isn't yet compatible with this compiler.
Hi mate, actually we use a lot babel-plugin-macros as you would know. I 've heard that Nextjs team and SWC will work to get styled-components and emotion available soon, that will be good news for Lingui because they use macros under the hood.
Hi mate, actually we use a lot
babel-plugin-macrosas you would know. I 've heard that Nextjs team and SWC will work to getstyled-componentsandemotionavailable soon, that will be good news for Lingui because they usemacrosunder the hood.
Thanks for the reply mate, great to hear support will be there soon.
@semoal after speaking to the Next.js team this will not be available for some time, and they recommend against using it for something like this when it comes because of the perf hit.
I will add my vote to this topic, I'm also looking forward to not use babel nor webpack anymore...
@semoal looks like swc plugin 2.0 is on the way, stay tuned :hourglass_flowing_sand: to know if js api is kept or if it's mandatory to write a rust plugin or not at the end. So the best thing to do at the moment is to subscribe to https://github.com/swc-project/swc/issues/2635#issue-1043151813 :wink:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is not stale. The nextjs team have done some progress on the subject: https://github.com/vercel/next.js/discussions/30174
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still relevant.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
It's not stale.
Maybe I'm getting wrong but it seems that Vercel stop to try to port @babel/macro to SWC. Did anyone is aware of a port or a solution to use SWC with linguijs?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Not stale.
There are already swc plugins for styled-components and emotion https://github.com/swc-project/plugins/tree/main/packages. Is that something that could be used as an inspiration/guideline for lingui plugin port?
We need someone to port the macros plugin and then Lingui could go next. I'm not an experienced programmer on Rust, but couldn't see anything yet on SWC to interact with the AST for doing the macro's magic thing.
I'll pin this issue for being updated about news from Next team or someone else that works in this field.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The #1224 has more activity about Lingui and SWC.
duplicate https://github.com/lingui/js-lingui/issues/1224