Closed tharvik closed 1 year ago
@jimmywarting yes you are correct on the reasons, this is meant to be used with browserify or webpack which auto handle subbing those things in
This would be a big help. I am using this tool with Vite and it currently throws an error due to using global instead of globalThis.
yeah I don't thing globalThis has enough support to be used exclusively yet https://github.com/rollup/plugins/tree/master/packages/inject might help you out
There is a new way to access globally defined variable, which is the same for both node and browsers, see Firefox' JS reference.
Currently, it's using
global
directly, which is only defined on node. https://github.com/crypto-browserify/randombytes/blob/f18ded32b209f0d4c637608a11ae042ae96b4c2e/browser.js#L16btw, why did you not use
windows
directly as it is meant for browser?