fix(javascript): honor module-sync package exports (#1361)
This commit is contained in:
1 parent
a9f5dad5a8
commit
d0e606930a
4 files changed
+58
-2
No files matched your search
@@ -640,7 +640,8 @@ const exportTargets = (
|
||||
* Node selects an exports target by walking the declared keys in order and
|
||||
* taking the first whose condition is active for the calling resolver.
|
||||
* "default" is always active, and "node" plus "node-addons" are active for the
|
||||
* built-in resolver that owns installed-package imports and requires.
|
||||
* built-in resolver that owns installed-package imports and requires. The
|
||||
* supported Node runtimes also activate "module-sync" for both loaders.
|
||||
*/
|
||||
const packageExportConditions = (
|
||||
moduleKind: ResolveArtifactPathInput["moduleKind"],
|
||||
@@ -648,6 +649,7 @@ const packageExportConditions = (
|
||||
new Set([
|
||||
"node",
|
||||
"node-addons",
|
||||
"module-sync",
|
||||
...(moduleKind === undefined ? [] : [moduleKind]),
|
||||
"default",
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user