diff options
author | 2021-09-01 14:00:46 -0700 | |
---|---|---|
committer | 2021-09-01 14:00:46 -0700 | |
commit | 4b7917ba8f5ee8e62b0e268d121b7fd30193b967 (patch) | |
tree | 2305a9665a83a5c25e168414a1fa56ff12e26a43 /src/runtime.js | |
parent | e2b9f232315fde2f47e0d55fb01f9f214ac2b3d3 (diff) | |
download | bun-4b7917ba8f5ee8e62b0e268d121b7fd30193b967.tar.gz bun-4b7917ba8f5ee8e62b0e268d121b7fd30193b967.tar.zst bun-4b7917ba8f5ee8e62b0e268d121b7fd30193b967.zip |
latest
Former-commit-id: 20b96180ffc41610dfb21a041d1258f2ff8d4196
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/runtime.js b/src/runtime.js index 96c1c2d6f..a76b3f077 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -69,7 +69,8 @@ export var __commonJS = (cb, name) => { }); // If it's a namespace export without .default, pretend .default is the same as mod.exports } else if ( - typeof mod.exports === "object" && + (typeof mod.exports === "object" || + typeof mod.exports === "function") && !("default" in mod.exports) ) { var defaultValue = mod.exports; @@ -184,3 +185,9 @@ export var __reExport = (target, module, desc) => { }); return target; }; + +if (typeof globalThis.process === "undefined") { + globalThis.process = { + env: {}, + }; +} |