How does one add External JavaScript Lib to an ionic 4 project?

Apologize in advance for not-so-accurate terminologies used in this post.

Here’s the Github repo of said JS lib: valence-sdk-javascript

I am new to ionic framework, heck, this is my first WebApp project and I’ve been searching for ways to include this js library to my app. Most of the info I found online are script tags in index.html which I believe does not exist in ionic 4. This library is not on npm. What should I do to include this lib?

This may be a silly request, but because this js contains auth, api call functions that I will be using on a lot of pages, could this lib be imported “globally”(as in I don’t need to import/include it on every page separately if I want to use it)

Thanks in advance for any help.

Since ionic 4 is written using Html and TypeScript I think it is more related to Angular than Ionic, you can refer to this link:

1 Like

What would you like for this library to add to your Ionic project?

I would like to use the functions in the library in typescript of each page.

If it were me, I would create my own equivalent of the functionality that the code you mentioned provides.