diff --git a/esm.js b/esm.js index c045416ca..9231c114b 100644 --- a/esm.js +++ b/esm.js @@ -283,6 +283,7 @@ if (cachePath !== "") { } } +// The legacy symbol used for `esm` export detection. defineProperty(makeRequireFunction, shared.symbol.package, { __proto__: null, value: true @@ -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