Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using with a create-react-app (v2) project #36

Open
rsuk opened this issue Nov 20, 2018 · 7 comments
Open

Using with a create-react-app (v2) project #36

rsuk opened this issue Nov 20, 2018 · 7 comments
Labels

Comments

@rsuk
Copy link

rsuk commented Nov 20, 2018

Any pointers on how it might be possible to use ts-nameof with a react project using create-react-app. That now uses babel for the typescript compilation so I'm unsure if it provides the configuration points necessary to set this up?

@dsherret
Copy link
Owner

@rsuk no sorry! There just needs to be a way to inject a ts.TransformerFactory<ts.SourceFile> object (the export of this library) into create-react-app and it would work. I haven't found anything yet, but I'll look again soon.

@refex
Copy link

refex commented Oct 28, 2020

any update on this? Thanks

@dsherret
Copy link
Owner

@refex create-react-app is very locked down, so I'm not sure there's a way to inject the transformer into it. It might be possible with https://github.com/timarney/react-app-rewired in case anyone has time to look into it (I do not at the moment).

@refex
Copy link

refex commented Oct 29, 2020

thanks for the hint

@jieny
Copy link

jieny commented Mar 3, 2021

ts-nameof.macro
babel-plugin-macros
import nameof from 'ts-nameof.macro';

@wondering639
Copy link

ts-nameof.macro
babel-plugin-macros
import nameof from 'ts-nameof.macro';

can you provide more details for beginners? :-)

@mmanna3
Copy link

mmanna3 commented May 31, 2021

It's explained here:

https://stackoverflow.com/a/67670187/7027224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants