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.
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. Triedbrowserify().external(['randombytes'])
it doesn't work:error: Cannot find module 'randombytes'
. Obviously my modulerandombytes
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.