typescript-relay-plugin icon indicating copy to clipboard operation
typescript-relay-plugin copied to clipboard

Where should this code go?

Open mahyarr opened this issue 8 years ago • 1 comments

Hi there, thanks a lot for open sourcing this library. The usage example looks very simple but I have a limited knowledge of setting up typescript so Im not sure where this transformer needs to go. Could you provide some information on where in the project this code should go? Im using webpack with TS 2.3.2.

mahyarr avatar May 08 '17 21:05 mahyarr

The custom transformer feature is still very new and not all Typescript loaders for Webpack support it. There has been some work on awesome-typescript-loader to allow this here https://github.com/s-panferov/awesome-typescript-loader/commit/468b3f7f24a0de761ca17214e73eb2298f03c1c0, but only if you're not using forkChecker. There's another PR pending to address that - https://github.com/s-panferov/awesome-typescript-loader/pull/423.

The idea is that you need the loader to allow passing the custom transformers through to the compiler. Depending on which one you use, you may or may not be in luck. I haven't tried it myself yet so I don't know how well that works and what you need to do exactly.

guncha avatar May 09 '17 16:05 guncha