That should be possible with subresource integrity.
https://developer.mozilla.org/en-US/docs/Web/Security/Subres...