Can I tweak the "watch" glob for running with live reload?

I’ve got an Ionic 4 / Angular 8 project in which I’m moving business logic from the app into a library. Ultimately, the library will be moved to it’s own workspace, but in the meantime I’ve got them both inside the same workspace.

This means my workspace for this project contains (amongst other things):

  • projects/lib/ with my library source code
  • dist/lib/ with the compiled library output
  • src/ with my app source code

While working on this, I’ve been running two terminal commands:

  1. ng build lib --watch
  2. ionic cordova run <platform> --device --livereload

The first command work exactly as expected, but the second seems to be watching everything in my workspace folder… So, the app running on my device reloads when I make changes to my library code, without waiting for the library to finish building.

I’m just curious, has anybody else set up an Angular workspace with Ionic project like this? Is there perhaps a better way to “dev” it?


Note: I did consider moving the application project into it’s own projects/app/ folder, however I’m (a) not sure if that would actually help in this case with using Ionic to run it, and (b) having the library project in this workspace is just temporary, it will be removed as soon as I done with the refactoring.

Right… Sorted. Keeping them in the same workspace was not the solution after all.

So, please excuse me while I go slap myself a few times with npm link