Npm modules and cocos

Is working with npm modules as streamlined as it is in vanilla javascript when working with cocos(Cocos creator Js)?
I’m trying to implement a js library that has a lot of dependencies so converting everything into one file would be extremely tedious to work with