Hmm that is a really good point.
Just trying to think of a solution here… would it work if type="text/javascript" and type="text/discourse-plugin" were treated differently? The API needs the latter, right?
type="text/javascript"
type="text/discourse-plugin"