So the question is pretty basic but I can\'t find it.
I created a new app through ng new my-project, followed by a ng g library my-library.
ng new my-project
ng g library my-library
I find and test this: https://github.com/angular/angular-cli/wiki/stories-create-library
So instead ng build --prod you should use ng build my-lib --prod
ng build --prod
ng build my-lib --prod