Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Use a simpler symbol for esm export detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Jan 30, 2019
1 parent 89f7528 commit 7913505
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ if (cachePath !== "") {
}
}

// The legacy symbol used for `esm` export detection.
defineProperty(makeRequireFunction, shared.symbol.package, {
__proto__: null,
value: true
Expand All @@ -293,6 +294,11 @@ defineProperty(makeRequireFunction, shared.customInspectKey, {
value: () => "esm enabled"
})

defineProperty(makeRequireFunction, "esm:package", {
__proto__: null,
value: true
})

defineProperty(makeRequireFunction, "process", {
__proto__: null,
value: jestTransform
Expand Down

0 comments on commit 7913505

Please sign in to comment.