Recently, I developed a typescript module that contains type definitions and JavaScript implementations in the dist folder. This typescript module serves as an npm package dependency hosted on an internal HTTP link. Below is a basic diagram depicting the current architecture.
https://i.sstatic.net/2G2Kn.png
Now, there is a new requirement to make the JavaScript implementation of the typescript module dynamic in order to avoid rebuilding the Angular app whenever there are changes in the external module implementation (unless the changes involve type alterations). Here is how I envision the revised architecture: https://i.sstatic.net/KxchU.png
Does anyone have any suggestions on how I could achieve this?