fix(javascript): honor module-sync package exports (#1361)

This commit is contained in:
Akshit Khokhani
2026-10-10 06:49:43 +08:00
committed by GitHub
parent a9f5dad5a8
commit d0e606930a
4 changed files with 58 additions and 2 deletions
@@ -307,6 +307,8 @@ such as `./web3:app.js` still names a local artifact.
Package `exports` fallback arrays are supported both at the top level and under
the root `"."` entry. The resolver selects targets in declared order using the
same conditional and invalid-entry handling as nested exports arrays.
For imports and requires, the active Node conditions include `module-sync`;
earlier active conditions retain precedence over later ones.
ESM relative module paths and selected package exports targets use URL suffix handling
and one percent-decoding pass. CommonJS relative paths and legacy package main