Simplify vm.Module #43899
Labels
esm
Issues and PRs related to the ECMAScript Modules implementation.
experimental
Issues and PRs related to experimental features.
help wanted
Issues that need assistance from volunteers or PRs that need help to proceed.
loaders
Issues and PRs related to ES module loaders
never-stale
Mark issue so that it is never considered stale
vm
Issues and PRs related to the vm subsystem.


GeoffreyBooth commentedJul 19, 2022
•
edited
One thing that comes up in user feedback about the
vm.ModuleAPI is that it requires excessive boilerplate, as you can see in the example in the docs: https://nodejs.org/api/vm.html#class-vmmodule. I think that most users want a straightforward ESM equivalent tovm.Script, without needing to define a context or a custom function for linking; the default should be to link modules as Node itself normally does. See also #43288 (comment).The text was updated successfully, but these errors were encountered: