1
0
Fork 0
mirror of synced 2024-10-03 19:43:32 +13:00
This commit is contained in:
Adria Navarro 2024-02-13 16:30:02 +01:00
parent 53d4fc2fa0
commit f03d9a0178

View file

@ -93,26 +93,6 @@ export class IsolatedVM implements VM {
}
}`
const helpersSource = loadBundle(BundleType.HELPERS)
// const helpersModule = this.isolate.compileModuleSync(
// `${injectedRequire};${helpersSource}`
// )
// helpersModule.instantiateSync(this.vm, specifier => {
// if (specifier === "crypto") {
// const cryptoModule = this.registerCallbacks({
// randomUUID: crypto.randomUUID,
// })
// const module = this.isolate.compileModuleSync(
// `export default ${cryptoModule}`
// )
// module.instantiateSync(this.vm, specifier => {
// throw new Error(`No imports allowed. Required: ${specifier}`)
// })
// return module
// }
// throw new Error(`No imports allowed. Required: ${specifier}`)
// })
this.moduleHandler.registerModule(`${injectedRequire};${helpersSource}`)
return this
}