Adding a pure JS library to Ionic using NPM

I finally succeeded having it work by following these steps : forum.ionicframework.com/t/… BUT I’m sure it’s not the right way to do it.