Laravel mix (webpack) and how to use node libraries in browser


I’m trying to import the iota js library for a personal laravel project This library doesn’t have any browsers version so I think laravel-mix(webpack) should be able to generate one from the source. In my webpack.mix.js I’ve tried to pass the whole library


But it doens’t work and I can find any relevat info in the laravel docs, should I pass something different to the mix.js?
And generally how webpack convert a node library into a browser one?