You have 2 options here in 3.1
The first is you can build everything into 1 single javascript file. That’s how bc_js_filepicker works - it builds all the dependencies and so on into 1 single javascript file. There are a a lot of javascript packaging systems out there, that library uses wepack.
The other alternative is is to use HTML import maps.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap
You can pull the libraries you want from a CDN or similar so you don’t have to package them into 1 file, they can load on the client’s browser at runtime. You can pull the libraries off of a public CDN or copy the libraries to the OOD’s public folder and have your javascript file reference that relative URL.