One of the technique you can use today called "Dynamic imports". It works beautifully with webpack, which automatically split your code, create chunks and dynamically load them on-demand.
Here is the example with vue component which will be loaded dynamically.
const Foo = () => import('./Foo.vue')
I believe you can use the same method to load 2 feature out of 20 feature library (as long as library has named exports)
Here is the example of that
var object = require('lodash/fp/object')
// OR in ES6 syntax
const object = () => import('load/fp/object')
I'm using this feature here in my code repository
github.com/techlab23/kanban-board-demo/blob/bulma…
Here is the demo (unfortunately codepen doesn't support webpack but it shows what i built)
codepen.io/nigamshirish/pen/XgqOVO (you can navigate to repos from the menu links as well)
Hope this helps.