-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loaders
Description
Version
20.0.0
Platform
Darwin ....* 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
package.json
{
"name": "import-meta-resolve-test",
"type": "module"
}loader.mjs
export function load(url, _, next) {
console.log(import.meta.resolve);
return next(url);
}index.mjs
console.log("hello world");node --experimental-import-meta-resolve --experimental-loader ./loader.mjs ./index.mjsHow often does it reproduce? Is there a required condition?
- Must be on Node v20 or above
- Reproduced every time
What is the expected behavior? Why is that the expected behavior?
console.log in loader should resolve import.meta.resolve
What do you see instead?
undefined is printed
Additional information
import.meta.resolve exists in <= Node v20, at least I checked in 16-19.
I didn't see anywhere in 20+ release notes of this capability being removed. If this is known, feel free to close this.
lodmfjord
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loaders