You could previously include JS libraries and they didn't count against the 10k limit. now they do. EDIT: Somehow, since lazy-loading not strictly required stuff apparently doesn't? (https://a-k-apart.com/faq#size)
You can lazy load libraries for sure. I would still keep those to a minimum, including only what you need. For instance, don’t load all of jQuery if you only need one feature. And use native JavaScript code when you can get away with it—dataset instead of data(), querySelectorAll() instead of $(), etc.