LoyDgIk
LoyDgIk
 I set allowEval to true, but it doesn't seem to work.
Have you tried `.compileV8Module().execute()`? This is when an error would be thrown, whereas `.executeVoid()` works without issues. I needed to use `.compileV8Module()` in `IV8ModuleResolver.resolve()` and that's how I discovered this...
``` kotlin fun resolve(runtime: V8Runtime, resourceName: String, v8ModuleReferrer: IV8Module): Any? { return when { resourceName.startsWith("/") || resourceName.startsWith("./") || resourceName.startsWith("../") -> { val parentModuleName = v8ModuleReferrer.getResourceName() val moduleRelativePath = Paths.get(parentModuleName).parent.resolve(resourceName).normalize() val...
> It's more like a JS trick as follows. > > ```java > nodeRuntime.allowEval(true); > nodeRuntime.getExecutor("const vm = require(\"node:vm\");\n" + > "const script = new vm.Script(\"eval('1+1')\");\n" + > "console.log(script.runInThisContext());\n" +...
> It's more like a JS trick as follows. > > ```java > nodeRuntime.allowEval(true); > nodeRuntime.getExecutor("const vm = require(\"node:vm\");\n" + > "const script = new vm.Script(\"eval('1+1')\");\n" + > "console.log(script.runInThisContext());\n" +...