-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nodejs ConsoleArgument '--experimental-vm-modules' invalid #377
Comments
Some of the arguments may not work by design. Why do you create a new |
Even removing the |
In |
ESM is handled by Javet module resolver. I don't think the whole thing would work. |
I think this is feasible const { Script, constants } = require('node:vm');
const script = new Script(
'import("./module.mjs")',
{ importModuleDynamically: constants.USE_MAIN_CONTEXT_DEFAULT_LOADER });
script.runInNewContext() In this code, |
This shows that the nodejs esm parser is still valid |
|
I plan to write a loader using the node:vm module to fully control module parsing and loading, but I found that the value of SourceTextModule is
undefined
, and I tried using the--experimental-vm-modules
argument but it didn't work.I don't know if the way to pass in the argument is correct.
The text was updated successfully, but these errors were encountered: