typescript-nameof / nameof

nameof in TypeScript
MIT License
12 stars 3 forks source link

How to integrate with `tsx` or `esbuild`? #15

Open wh1t3cAt1k opened 2 weeks ago

wh1t3cAt1k commented 2 weeks ago

Hey, thanks a lot for picking up the torch, I was a big fan of the original ts-nameof package and have used it extensively.

Recently, because ts-node is becoming increasingly obsolete, I considered migrating to https://tsx.is/, which uses esbuild under the hood. However, the nameof syntax does not seem to work there, and looks like a plugin is needed.

Is it currently not supported, and is it a huge hassle to introduce it to this package?

Right now our project seems cursed to use old / slow versions of everything because we cannot get proper nameof support in the newer tooling...

manuth commented 2 weeks ago

I actually came to think about adding esbuild support some time ago but didn't find any usable methods.

I'll dig into it sometime later. For now, I'm getting myself familiar with Rust in order to add SWC support.

PRs for an esbuild integration are welcome! So, if you want to try to add esbuild support on your own, I'll take whatever time necessary to help you getting it done.