In addition to Solution 1 and 2:
Minimizing the traffic of the scripts can be a good thing, but… Please see my comment to the question. It's purpose is to convince you not to consider obfuscation as a security measure. It can be considered as one of kinds of
security through obscurity. If you think it's pretty good and makes practical sense, think again. Read, for example, this:
https://en.wikipedia.org/wiki/Security_through_obscurity[
^].
As to the practical considerations, I don't think what you called "security" is really related to security. I would rather think that you don't want others to steal your script code. Here, I would advise to think at simple practical consequences of it. If your code is really valuable so some people would badly want to steal it, your obfuscation cannot stop them, because your full code will always be on the client side, and other people won't even try to look at it.
—SA