Skip to content

esm: convert resolve hook to synchronous#43363

Merged
nodejs-github-bot merged 15 commits intonodejs:mainfrom
JakobJingleheimer:esm/synchronous-resolve-hook
Jun 18, 2022
Merged

esm: convert resolve hook to synchronous#43363
nodejs-github-bot merged 15 commits intonodejs:mainfrom
JakobJingleheimer:esm/synchronous-resolve-hook

Conversation

@JakobJingleheimer
Copy link
Copy Markdown
Member

@JakobJingleheimer JakobJingleheimer commented Jun 9, 2022

Notable changes

This PR converts the resolve hook from asynchronous to synchronous to align with the general ecosystem (most namely browsers). When a resolve hook returns a thenable (eg async or promise), an error is specifically thrown.

It also converts import.meta.resolve() to synchronous.

Unblocks

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders notable-change PRs with changes that should be highlighted in changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants