tspath
tspath copied to clipboard
Not substitue path in d.ts
My code is something like this dist/ src/ index.ts hello.ts
where index.ts contains
export * from 'src/hello';
In dist/, after running tspath, index.d.ts still contains
export * from 'src/hello';
Currently, definition files are not supported, there is a new version 2 coming very soon, this release is a very serious release which will contain support for definitions among many other frequently requested features.
Hi @duffman, when is this release coming? We're 5 months further and you said "Very soon" I just ran into this exact same issue when trying out tspath (loving the tool by the way, great work). I cannot use it without definition file support though.
@barthuijgen if it helps you, or anyone, this can be done via ttypescript
+ @zerollup/ts-transform-paths
. Here's a working example config -note that the config extends a tsconfig.json
file, which in turns extends a jsconfig.json
containing the paths. Then just call ttsc
instead of tsc
-works as a drop-in replacement.
Thanks @rafamel, I tried out your solution, and while it does seem to output correct files in my dist, it also produces a lot of typescript build errors of "module not found", I'm unsure which repository to submit this as an issue to. tspath sofar works the best for me, except not transforming .d.ts files :(
@duffman some news about it?
any news on this ? @duffman