Closed mariusk closed 8 months ago
The docs state that it is, and recommends a builder/bundler etc. I'm using vite, and when importing libauth in an otherwise working project I get:
[vite] ✘ [ERROR] Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides) [vite] node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js:6:53: [vite] 6 │ ... [sha1, sha256, sha512, ripemd160, secp256k1] = await Promise.all([ [vite] ╵ ~~~~~
So is it supporte, and if so, what is needed to get it working?
For vite: https://www.npmjs.com/package/vite-plugin-top-level-await
Thanks, with some messing around with the vite config that works.
The docs state that it is, and recommends a builder/bundler etc. I'm using vite, and when importing libauth in an otherwise working project I get:
So is it supporte, and if so, what is needed to get it working?