Open
Description
When required script contains syntax errors, it silently skips it just like file was not included.
$v8 = new V8Js();
$v8->setModuleLoader(function ($path) {
return 'synta}{ error!'; // returns undefined
// return 'module.exports = 1'; // this works
});
$script = 'let a = require("file.js"); print(a)';
$r = $v8->executeString($script);
echo $r;
Is there any way to get syntax error exception when module loader returns invalid code?