Skip to content

Angular Library produced NPM package that offers imports from public-api and lib #15936

@CraigComeOnThisNameCantBeTaken

Description

🐞 bug report

Affected Package

Is this a regression?

Description

After creating a new Angular library using the cli, and adding one exported class within the lib folder, which public-api.ts file exports, consuming applications are able to reference public-apit.ts as well as the lib folder as import locations.

image

🌍 Your Environment

Angular Version:

Angular CLI: 7.3.9
Node: 8.11.3
OS: win32 x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.13.9
@angular-devkit/build-angular      0.13.9
@angular-devkit/build-ng-packagr   0.13.9
@angular-devkit/build-optimizer    0.13.9
@angular-devkit/build-webpack      0.13.9
@angular-devkit/core               7.3.9
@angular-devkit/schematics         7.3.9
@angular/cli                       7.3.9
@ngtools/json-schema               1.1.0
@ngtools/webpack                   7.3.9
@schematics/angular                7.3.9
@schematics/update                 0.13.9
ng-packagr                         4.7.1
rxjs                               6.3.3
typescript                         3.2.4
webpack                            4.29.0



Anything else relevant?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions