LegendApp / legend-state

Legend-State is a super fast and powerful state library that enables fine-grained reactivity and easy automatic persistence
https://legendapp.com/open-source/state/
MIT License
2.59k stars 76 forks source link

Is there SWC alternative to Babel plguin? #109

Open potikhanovsergey opened 1 year ago

potikhanovsergey commented 1 year ago

Hi, I'm using Next 13 and some of it's features require using SWC instead of babel (like next/font). Is there Is there SWC alternative to Babel plugin?

jmeistrich commented 1 year ago

The Babel plugin is purely for convenience for the Show/Computed/Memo components to automatically make their children functions (so they don't render until actually used). But everything works fine without it. So the easy answer is to just go without that convenience.

I think SWC has a plugin system so it should be possible? The babel plugin is pretty basic so hopefully that would be straightforward. But it would be in Rust which is out of my current wheelhouse, and my plate is full with other work. If you'd like to submit a PR with an SWC plugin that would be great!

Syynth commented 3 months ago

Just checking to see if this is something that the team would like a contribution on? I'm not an expert in rust but I think I could handle it, if someone is willing to help me understand what would be required for distributing the plugin once it's implemented.

jmeistrich commented 3 months ago

@Syynth That would be great! We would ideally include it in this package if you'd like to submit a PR?

warrenbhw commented 1 week ago

@Syynth did you ever get around to this?