dts-bundle
dts-bundle copied to clipboard
classic module resolution with non-relative path.
It wasn't working if the files are in the non-relative path.
//index.ts
export {default as Foo} 'src/foo';
export {default as Foo2} 'src/foo2';
//src/foo.ts
export default class Foo
{
bar():boolean
{
return true;
}
}
//src/foo2.ts
import Foo 'src/foo';
export default class Foo2 extends Foo
{
bar():boolean
{
return true;
}
}
I just ran into this behavior. I'll elaborate since the original issue isn't super clear.
I have a ts project that uses the baseUrl compiler option to set ./src as the base import path for my ts scripts. This means my scrips have absolute imports that that look like models/Foo which is found by tsc as ./src/models/Foo.
When I use dts-bundle all of my baseUrl imports are not bundled, instead they show up in the list of dependencies in the built index.d.ts file.
If change baseUrl style imports to relative imports, then the typings are bundled in the rendered index.d.ts output file as expected.
Just added a PR to solve this.
Seems like this library has been abandoned, could we have an update about the state? We are having the same problem as @octatone comment