$ the-wire · showcase
JEST FIXES ES MODULE RESOLVER LOADING
By RepoJournal · Filed · About Meta · Composed from the cited sources · methodology
Jest can now load custom resolvers written as ES modules, closing a gap that forced developers back to CommonJS workarounds.
The jest-resolve module shipped a fix [1] that extends loadResolver to accept ES module exports alongside the existing function and object hook patterns. Previously, importing a resolver written as an ES module would fail validation even if it exported a valid sync or async hook [2]. The change maintains backward compatibility: loadResolver still accepts functions or objects with sync/async properties, but now correctly handles the module format that modern Node.js favors. This solves issue #16284 and closes PR #16332 with a single commit across the repo this period.
Action items
- → Upgrade Jest when next available to resolve ES module resolver issues facebook/jest [plan]
References
- [1] fix(jest-resolve): load a user resolver written as an ES module ↗ facebook/jest
- [2] fix(jest-resolve): load a user resolver written as an ES module (#16332) ↗ facebook/jest