-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Description
In #17560, we added the ability for users to created their own ECMAScript Modules with the vm.Module class (more information can be found in the documentation). However, as of right now the import.meta exposed in vm.Modules is always an empty object:
> module = new vm.Module('import.meta')
Module {
status: 'uninstantiated',
linkingStatus: 'unlinked',
url: 'vm:module(0)',
context: undefined }
> (node:22093) ExperimentalWarning: vm.Module is an experimental feature. This feature could change at any time
> await module.link(() => {})
undefined
> module.instantiate()
undefined
> var { result } = await module.evaluate()
undefined
> result
{}Ideally, we would like the callers of vm.Module to be able to customize what import.meta contains in the created module.
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.