Skip to content

Simplify vm.Module #43899

Open
Open
@GeoffreyBooth

Description

@GeoffreyBooth

One thing that comes up in user feedback about the vm.Module API 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 to vm.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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    esmIssues and PRs related to the ECMAScript Modules implementation.experimentalIssues and PRs related to experimental features.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.loadersIssues and PRs related to ES module loadersnever-staleMark issue so that it is never considered stalevmIssues and PRs related to the vm subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions