I ran into a similar issue lately while trying to use another library (tiff.js) in a small project I was experimenting with.
The way I got around this was to add the following to my package.json file, right after the devDependencies
section.
"devDependencies": {
...
},
"browser": {
"crypto": false
}
This didn’t seem to have any adverse effect when trying to use the library in the application.