How to install npm packages in custom themes/plugins

Sorry for necroing this thread but it’s the most relevant one I could find.
I am trying to add this package in a plugin. I would like to import it using import { RadixDappToolkit, RadixNetwork } from '@radixdlt/radix-dapp-toolkit'

It’s also avaliable on Yarn which I think is what Discourse use, but I don’t think I can just add it as a dependency..can I?

I’m not sure I can just load it using unpkg either since it has lots of dependencies. What options do I have? Any pointers are appreciated.

Sorry for the broad question, but I’m very confused. Thank you!