My approach is to minimise dependencies in the software I use and create. This is the opposite of creating software by bolting together packages and libraries, which has become a common approach. The initial motivation for this approach was to make the apps I develop easier to upgrade and maintain.
However, it turns out that to truly optimise web performance you need to control the code which creates your page, so this approach allows my websites to be fully optimised. Most third part packages were created to add functionality without consideration of the impact on the speed of the site or the impact on mobile users.
It might seem counterproductive to spurn libraries build to make developers' lives easier and to add functionality, but I have found that it often takes as much time to understand how to use the library as it took to understand the underlying raw code. And in most circumstances, you really need to understand the underlying code to optimise your app anyway, so I choose to learn how to use the raw code and APIs directly instead of through a library wherever possible.