How to use the "live reload" with Angular and Cordova only, without Ionic CLI?

I have to use Ionic without Ionic CLI (native build) for technical reasons. Some background: I have a multi-app monorepo with single dependencies. Using Ionic 5 with Angular 10 and the latest Cordova. I build it with Angular and Cordova only. No Ionic command, because it does not support my monorepo workspace. For simplicity I created my own build script. I works great. I can build the release apk, run it on the device or serve it on desktop. …

Now I want to use the live reload feature on the device. In Ionic CLI it’s the command:
ionic cordova run android -l

But I want to know how it works to use it without the Ionic CLI.
I know that it’s like ng serve. Just serve the page as server on my local IP and the Android app just loads the html from the Angular server. …

I cannot find the related source code in GitHub.
Any idea, comment, link, etc. are welcome.

I wondering, live reload of Ionic should work in Angular, React and Vue (soon), right? I guess that the live reload just provides a custom app (index.html, etc.) which loads the content from the server in local network.

I’ve got good news and bad news. The good news is that the source is here. The bad news is that it’s part of Ionic CLI.

Thanks, … anyway, I use the Angular serve (ng serve --host="0.0.0.0" for external access), build my app with Angular and Cordova (cordova run android). Either with a custom HTML which redirects to the Angular server or I include an option in development mode only to navigate to the Angular page (e.g. button). For example:

window.open(`http://192.168.0.123:4200`, '_self');

(The config.xml should have <allow-navigation href="*"/>)

It works!