We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
globalThis.crypto
1 parent 774bbbb commit 4948828Copy full SHA for 4948828
packages/nuxi/src/main.ts
@@ -1,3 +1,4 @@
1
+import nodeCrypto from 'node:crypto'
2
import { resolve } from 'node:path'
3
import process from 'node:process'
4
@@ -11,6 +12,11 @@ import { setupGlobalConsole } from './utils/console'
11
12
import { checkEngines } from './utils/engines'
13
import { logger } from './utils/logger'
14
15
+// globalThis.crypto support for Node.js 18
16
+if (!globalThis.crypto) {
17
+ globalThis.crypto = nodeCrypto as unknown as Crypto
18
+}
19
+
20
export const main = defineCommand({
21
meta: {
22
name: name.endsWith('nightly') ? name : 'nuxi',
0 commit comments