Is there a way to use an npm library on my client script for a doctype?

Hey there, I wanted to know if it is possible for me to use an npm library or via cdn in a client script for a doctype?

Thank you in advance!