-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Transformers with transpileOnly #1051
Transformers with transpileOnly #1051
Comments
Git blame offers some context. https://github.com/TypeStrong/ts-node/blame/master/src/index.ts#L789 Transformers get access to the typechecker, which isn't available in transpileOnly mode. If you want to use transformers in transpileOnly mode, I recommend using
https://github.com/cevek/ttypescript/tree/master/packages/ttypescript |
Yup, but there are other transformers as well. For example: A transformer to process path aliases and can be done in transpile only mode as well.
Yes, but don't want to use that. The main question was, if |
Looking at our source code again, it looks like transformers actually are supported in |
The code right now only accepts the Whereas the options Typescript accepts are following. interface TranspileOptions {
compilerOptions?: CompilerOptions;
fileName?: string;
reportDiagnostics?: boolean;
moduleName?: string;
renamedDependencies?: MapLike<string>;
transformers?: CustomTransformers;
} |
In that case, marked as "bug" and "help wanted." We'll accept a pull request that fixes it. |
Sure, I will do a PR. Just wanted to understand, if we both expect it to work. Thanks 😄 |
This is (finally) published in v9.0.0: https://github.com/TypeStrong/ts-node/releases/tag/v9.0.0 |
Hello, |
I have read the readme file and it does mention that the transformers are not supported with the
transpileOnly
mode.I do see that the source code is using ts.transpileModule which does support custom transformers. So my question is mainly to understand the reasoning behind not allowing transformers, when the underlying API of typescript allows it?
The text was updated successfully, but these errors were encountered: