browserify / randombytes

random bytes from browserify stand alone
MIT License
99 stars 47 forks source link

how to shim randombytes? #20

Closed pkit closed 1 year ago

pkit commented 5 years ago

What is the proper way to shim/monkeypatch/replace this library? I.e. I need to use my version of randomBytes() function for an exotic platform that is not supported. Tried browserify().external(['randombytes']) it doesn't work: error: Cannot find module 'randombytes'. Obviously my module randombytes is available, so the error is bogus. And because browserify never produces any logs I have no idea what was included in the bundle and how exactly it searches for the module in question.

dcousens commented 1 year ago

I don't know if this question is in scope, and it's 4 years past