-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Open
Labels
vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Description
Is your feature request related to a problem? Please describe.
When using vm.SourceTextModule we have to implement a linker, initializeImportMeta, and importModuleDynamically, even if we just want the default behavior of built-in module support. There are many subtle ways to get that wrong.
Describe the solution you'd like
Default implementations that do basically what built-in module support does:
- A linker function that:
- Reads files from disk, within a specified root.
- Uses Node module resolution as implemented for modules
- Uses a specified module cache
initializeImportMeta
that setsurl
property- By configuration, allows access to built-in modules.
Describe alternatives you've considered
Userland libraries can take the first cuts at easy-to-use vm.Modules, but I think something for common use cases should likely be included.
marcj, akvadrako, gilbert, SalvatorePreviti, martijndeh and 4 more
Metadata
Metadata
Assignees
Labels
vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.