simbathesailor / use-what-changed

A React hook and an easy to use babel-pugin to debug various React official hooks
https://codesandbox.io/s/simabthesailoruse-what-changed-demo-q94rn
MIT License
657 stars 12 forks source link

SWC usage? #49

Open tunesmith opened 2 years ago

tunesmith commented 2 years ago

In our Next.js project we recently moved from babel to SWC and unfortunately that meant we got rid of the babel integration for use-what-changed. Is there a way to continue to use // uwc-debug if we are using SWC?

geryit commented 1 year ago

Yes, Nextjs support would be great!

simbathesailor commented 1 year ago

Hey there , Yes that would be great .I just explored a bit around it. It looks like you can write plugins with swc also https://swc.rs/docs/plugin/ecmascript/getting-started#implementing-simple-plugin

A swc plugin similar to https://github.com/simbathesailor/babel-plugin-use-what-changed has to be created which will make use of this library.

Unfortunately i don't have bandwidth right now . If some one creates it, i can review it.