-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
When using [email protected]
in a browser environment with Vite as the build tool, the following error occurs:
Uncaught ReferenceError: global is not defined
This error stems from the browser.js implementation attempting to access the global
object which is not available in browser DOM environments:
var Buffer = require('safe-buffer').Buffer
var crypto = global.crypto || global.msCrypto
As the source code mentioned below crypto
is defined correctly
Lines 15 to 16 in b4eb412
const _global = typeof globalThis !== 'undefined' ? globalThis : global | |
const crypto = _global.crypto || _global.msCrypto |
alexisab and aryzing
Metadata
Metadata
Assignees
Labels
No labels