-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Description
🚀 Feature Proposal
import.meta.resolve
is unflagged since Node.js 20.6.0.
Motivation
Currently we have to do this:
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
require.resolve("foo");
require.resolve("bar");
When implemented, we can instead do this:
import.meta.resolve("foo");
import.meta.resolve("bar");
Example
No response
Pitch
One more step toward full ESM compatibility. Opening this issue because it doesn't appear to be tracked in #9430.