I've thought a lot about this and honestly I'm curious if this would even be an advantage. Currently I can pull in jQuery from a CDN and it is likely used by many other sites. If I have a custom version of jQuery, now it is guaranteed to need to be loaded. Is it truly a win?
If you're using a build system like webpack you can use Babel/minify to get rid of unused code or pick and choose your modules directly from the npm package.