dts-bundle icon indicating copy to clipboard operation
dts-bundle copied to clipboard

classic module resolution with non-relative path.

Open veeramarni opened this issue 8 years ago • 3 comments

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;
    }
}

veeramarni avatar Apr 13 '17 21:04 veeramarni

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.

octatone avatar Sep 12 '17 13:09 octatone

Just added a PR to solve this.

justindra avatar Oct 23 '17 06:10 justindra

Seems like this library has been abandoned, could we have an update about the state? We are having the same problem as @octatone comment

inakiarroyo avatar Sep 24 '18 14:09 inakiarroyo