Closed jasonkuhrt closed 2 years ago
@jasonkuhrt Hi Jason. I'm the maintainer of that library. As of v3.1, we had to switch resolution strategy to a compiler function which requires an EmitHost
. I did not consider ts-node's transpileOnly.
Please post an issue over there, and I'll address it.
We had a similar case with another plugin. After discovery it seemed to make sense however :)
After discovery it seemed to make sense however :)
Glad to hear it. I didn't think it'd be too broad, as few people use programmatic compiler API to make use of transpile
, however, I hadn't considered that ts-node
uses this also. The good news is, very little of the EmitHost
is used, so I can easily put together a functional host to fall back on.
@nonara done https://github.com/LeDDGroup/typescript-transform-paths/issues/123 🙏
And that would be great because the perf difference of --transpileOnly
is huge (at least in our case).
Agreed! Type checking is the most expensive part of the compilation process. I wasn't aware that anyone was using the extension without. Will have a look at this hopefully this weekend
Just finished. New version will release soon.
Just wondering what the use case looks like for you guys?
It should be able to run without the transformer via tsconfig-paths
. (ie. ts-node -T -r tsconfig-paths/register
)
Are you actually emitting source with ts-node?
Just wondering what the use case looks like for you guys?
It should be able to run without the transformer via
tsconfig-paths
. (ie.ts-node -T -r tsconfig-paths/register
)Are you actually emitting source with ts-node?
Just don't want to use another tool to play with ts-node
.
Are you actually emitting source with ts-node?
Nope not emitting, just running scripts.
Support added in v3.2.0
Nope not emitting, just running scripts.
Ah, ok. Performance-wise, I'm thinking tsconfig-paths
will probably be faster for you, but if you're using any of the special features like custom tags, exclusion options, etc. you should be able to use the plugin with transpileOnly now.
If anything doesn't work properly, please let me know!
Ah, ok. Performance-wise, I'm thinking tsconfig-paths will probably be faster for you
Interesting, at that point I think the issue is about project complexity, more setup/deps etc.
I discovered that with transpileOnly option enabled that
typescript-transform-paths
does not work.I assume this is not specific to
typescript-transform-paths
and general tottypescript
.If so a disclaimer about this should be added to the readme. Easy way to lose some time or give up altogether.