Skip to content

incorrect paths for import statement is generated #1405

Open
@musou1500

Description

@musou1500

Type of Issue

[x] Bug Report
[ ] Feature Request

Description

incorrect paths for import statement can be generated when a project has multiple library workspaces.

I think the following issue is similar to this issue.
#1109

How To Reproduce

I created a repository for reproduce this bug.

  1. git clone https://github.com/musou1500/test-angular-workspace
  2. ng build lib2 && ng build lib1
  3. open dist/lib1/lib/lib1.service.d.ts. then you can see an incorrect path for import on Lib1Service.test method.
    // should be ../../../dist/lib2/lib2
    test(): import("../../../../dist/lib2/lib2").Entity;

Expected Behaviour

the correct path for import statements should be generated.

Version Information

$ node_modules/.bin/ng-packagr --version
ng-packagr:            5.5.1
@angular/compiler:     8.2.7
rollup:                1.21.4
tsickle:               0.36.0
typescript:            3.5.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions