Skip to content

Commit 9d06f66

Browse files
KTrain5169frogneko
andcommitted
polyfill crypto
thanks to frogneko for helping me spot this Co-authored-by: frogneko <kulukkuluu@gmail.com>
1 parent cf1e9c7 commit 9d06f66

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

esbuild-configs/web.esbuild.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ export async function webTestBrowser(_prodFlag, watchFlag) {
141141
polyfillNode({
142142
polyfills: {
143143
child_process: false,
144+
crypto: true,
144145
module: false,
145146
os: false,
146147
path: false,

src/test/test_utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as vscode from 'vscode';
33
import { setVirtualCursor } from '@/utils/misc';
44
import { RCEContext } from '@ctx/rce';
55
import { ActionData } from 'neuro-game-sdk';
6-
import { randomUUID } from 'crypto';
6+
import { randomUUID } from 'node:crypto';
77

88
export const fakeContext = <const TParams extends ActionData['params']>(name: string, params: TParams) => {
99
const ctx = new RCEContext({ id: randomUUID(), name, params });

0 commit comments

Comments
 (0)