Hi there! The best way to consume npm packages in your app_plugins package, is in my opinion to use some sort of javascript build framework, like webpack or vite. You can see an example of vite on this particular branch on my URL Tracker source code:
https://github.com/Infocaster/UrlTracker/tree/v10/feature/redesign/src/UrlTracker.Backoffice.UI
Alternatively, many packages offer a 'cdn url' that you can include using the assets service in AngularJS, but you'd have to halt execution until the source is loaded.