js-lingui icon indicating copy to clipboard operation
js-lingui copied to clipboard

Support for SWC

Open matthewlilley opened this issue 4 years ago • 16 comments

We just dropped bable in favor of SWC but it seems Lingui isn't yet compatible with this compiler.

matthewlilley avatar Oct 28 '21 14:10 matthewlilley

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.

semoal avatar Oct 28 '21 14:10 semoal

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.

Thanks for the reply mate, great to hear support will be there soon.

matthewlilley avatar Oct 28 '21 20:10 matthewlilley

@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.

matthewlilley avatar Nov 11 '21 00:11 matthewlilley

I will add my vote to this topic, I'm also looking forward to not use babel nor webpack anymore...

Hideman85 avatar Nov 30 '21 15:11 Hideman85

@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:

shouze avatar Dec 09 '21 08:12 shouze

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.

stale[bot] avatar Feb 08 '22 02:02 stale[bot]

This issue is not stale. The nextjs team have done some progress on the subject: https://github.com/vercel/next.js/discussions/30174

armandabric avatar Feb 14 '22 13:02 armandabric

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.

stale[bot] avatar Apr 15 '22 22:04 stale[bot]

Still relevant.

MarkMurphy avatar Apr 16 '22 01:04 MarkMurphy

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.

stale[bot] avatar Jun 18 '22 15:06 stale[bot]

It's not stale.

gynekolog avatar Jun 18 '22 16:06 gynekolog

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?

armandabric avatar Jul 05 '22 07:07 armandabric

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.

stale[bot] avatar Sep 08 '22 22:09 stale[bot]

Not stale.

Cielquan avatar Sep 09 '22 06:09 Cielquan

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?

belaczek avatar Sep 14 '22 16:09 belaczek

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.

semoal avatar Sep 20 '22 13:09 semoal

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.

stale[bot] avatar Nov 19 '22 18:11 stale[bot]

The #1224 has more activity about Lingui and SWC.

gynekolog avatar Nov 21 '22 10:11 gynekolog

duplicate https://github.com/lingui/js-lingui/issues/1224

timofei-iatsenko avatar Jan 08 '23 18:01 timofei-iatsenko