I'm currently running an Angular 8 project along with it's library on the same version. This library lives in another completely different project so we required to do an npm link inside library, npm link my-libray within my-app and then launch ng build my-libray --watch inside my-library project and ng serve in my-app.
Problems with this approach is whenever I make a change in the library, a rebuild process is running on my-app and never waits until is fully complete the rebuild process in the library since the dist folder is removed resulting in webpack crashing and yes, I can actually stop the process and re run ng serve again but if rebuild time is already time consuming, I prefer not to mention how long takes to serves up the app again.
How could I approach this in a not so painful way? Ideally I'd like to know if for a dev environment I can play with just the raw code rather than pointing to the dist build version. I think that's something which can be accomplished by just modifying paths attributes inside tsconfig.json to make your library pointing to a different folder, something like this:
"paths" {
"my-library": ["libs/my-library/src/*"]
}
But this only works if you work in the same workspace and as I just said, library and app lives in differents repositories.