unjs / jiti

Runtime Typescript and ESM support for Node.js
MIT License
1.49k stars 52 forks source link

fix: resolve with esm conditions in async context #264

Closed pi0 closed 1 week ago

pi0 commented 1 week ago

In async mode, jiti should always resolve with async/esm conditions.

This PR also exposes jiti.importResolve utility that uses esm condition in contrast to jiti.resolve that is CJS.