If you want to achieve this, one way is by utilizing the jQuery.getScript() method.
In my test, I found that it works well with Power BI Developer Tools and custom visualizations. I experimented with the jQuery.browser plugin like so:
$.getScript("https://cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.1.0/jquery.browser.js", function( data, textStatus, jqxhr ) {
//Now the external scripts is loaded. You can start using it
});
Once the script is successfully loaded (when the jQuery.getScript success callback is triggered), you can easily utilize it. In my case, I used $.browser. Just remember that it will only be accessible once loaded, so make sure to adjust your code to wait for it before proceeding with data processing and visualization creation. It's also advisable to check if the script is not already loaded to avoid redundant downloads.
An alternative, albeit not elegant solution, is to manually insert the scripts you need into the Dev Tools (e.g., at the end of the file).
I'm not aware of any other recommended options by the Power BI team at the moment. There may be future updates that allow importing scripts via reference.
I hope this information proves useful to you. Best of luck!