Who controls the Internet? Analyzing global threats
blog.acolyer.org
blog.acolyer.org
Importantly, the first and third can be mitigated by subresource integrity (SRI) in modern browsers. If you don't control the host/CDN serving your static JS, that's how you protect against these attacks.
(The second, of course, is mitigated by regular old HTTPS.)
If the main HTML web server is compromised, there's nothing you can do: a compromised web server can send whatever <SCRIPT> tag it wants.