summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/server/src/helpers/iso/isoCrypto/getWebCrypto.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/helpers/iso/isoCrypto/getWebCrypto.ts b/packages/server/src/helpers/iso/isoCrypto/getWebCrypto.ts
index 019847d..a5e580e 100644
--- a/packages/server/src/helpers/iso/isoCrypto/getWebCrypto.ts
+++ b/packages/server/src/helpers/iso/isoCrypto/getWebCrypto.ts
@@ -17,8 +17,8 @@ export async function getWebCrypto(): Promise<Crypto> {
*/
// @ts-ignore: We'll handle any errors...
// dnt-shim-ignore
- const _crypto = await require('node:crypto');
- webCrypto = _crypto.webcrypto as unknown as Crypto;
+ const _crypto = await import('node:crypto');
+ webCrypto = _crypto.webcrypto as Crypto;
} catch (_err) {
/**
* Naively attempt to access Crypto as a global object, which popular alternative run-times