Trying to get module exports like the example here
The module is loaded with load_main_module, I call mod_evaluate on the ID returned, then do the below:
But the value returned is always undefined
Js:
export function test() { return 2;}
Rust:
let module_namespace = self.deno_runtime.get_module_namespace(module_id)?;
let mut scope = self.deno_runtime.handle_scope();
let module_namespace = v8::Local::<v8::Object>::new(&mut scope, module_namespace);
let key = v8::String::new(&mut scope, "test").unwrap();
let value = module_namespace.get(&mut scope, key.into()).unwrap();
println!("{}", value.is_undefined()); // true