Problems importing jsBarcode trough webpack

I’m trying to import JsBarcode for using it in my theme. running yarn build works fine, the module is being imported without any problems. However when executing the code this error is thrown:
_WEBPACK_IMPORTED_MODULE_2_jsbarcode_dist_JsBarcode_all___default(...) is not a function
I am importing jsPDF exactly the same way, without any issues. Does anyone know how this problem can be solved?