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.
Currently there is no supported way to do this out of the box. As suggested by @oklymenk you should for now go with a custom script which will chain all these build commands.
Also the link shared by @Eutrepe, you can see that they are planning to get rid of this re build thing everytime you make changes to your library.
Running ng build my-lib every time you change a file is bothersome and takes time.
Some similar setups instead add the path to the source code directly inside tsconfig. This makes seeing changes in your app faster.
But doing that is risky. When you do that, the build system for your app is building the library as well. But your library is built using a different build system than your app.
Those two build systems can build things slightly different, or support completely different features.
This leads to subtle bugs where your published library behaves differently from the one in your development setup.
For this reason we decided to err on the side of caution, and make the recommended usage the safe one.
In the future we want to add watch support to building libraries so it is faster to see changes.
We are also planning to add internal dependency support to Angular CLI. This means that Angular CLI would know your app depends on your library, and automatically rebuilds the library when the app needs it.
Why do I need to build the library everytime I make changes?