Skip to content
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

classic module resolution with non-relative path. #49

Open
veeramarni opened this issue Apr 13, 2017 · 3 comments
Open

classic module resolution with non-relative path. #49

veeramarni opened this issue Apr 13, 2017 · 3 comments

Comments

@veeramarni
Copy link

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;
    }
}
@octatone
Copy link

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.

@justindra
Copy link

Just added a PR to solve this.

@inakiarroyo
Copy link

inakiarroyo commented Sep 24, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants