Skip to content

Commit 29ddb60

Browse files
committed
fix: correctly polyfill globalThis.crypto
nitrojs/nitro#3402
1 parent 19ba8b0 commit 29ddb60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nuxi/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { logger } from './utils/logger'
1414

1515
// globalThis.crypto support for Node.js 18
1616
if (!globalThis.crypto) {
17-
globalThis.crypto = nodeCrypto as unknown as Crypto
17+
globalThis.crypto = nodeCrypto.webcrypto as unknown as Crypto
1818
}
1919

2020
export const main = defineCommand({

0 commit comments

Comments
 (0)