I created an angular workspce:
ng new my-workspace --createApplication="false"
then create an app:
ng g application my-app --routing=true --style=scss
then create a library:
ng g library my-lib --prefix=lib
now I want to just import component of library, not whole of library
so import componet library to app module:
import { MyLibComponent } from 'my-lib';
declarations: [AppComponent,MyLibComponent],
then build library and serve app, erverything is ok.
then build app, again everything is ok.
but when build in product mode, i get an error that: 'MyLibComponent is part of 2 module'!
i think here library is another app but in the same workspace.
also when I import library module (instead of library component: import { MyLibModule } from 'my-lib';)it woks!
what is my wrong?