Provide built-in implementations of module linker, initializeImportMeta, importModuleDynamically
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
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
initializeImportMetathat setsurlproperty- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the vm.SourceTextModule entry point and the Node module-resolution behavior referenced in the issue. Work through the requested linker, initializeImportMeta, and importModuleDynamically defaults, including the root, module cache, and built-in-module configuration. Done means common vm.Modules can use built-in implementations without custom callbacks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100