aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.footer.bun.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-07-15 23:08:25 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-07-15 23:08:25 -0700
commitf7e9b91701d60f1f1a319acf799871c20aee007a (patch)
tree3d4db34d5b6c6c84b7d8ad9b4b80c967b2b33626 /src/runtime.footer.bun.js
parente7246837a11e94a2268a34c72d6bc87b243b0a64 (diff)
downloadbun-f7e9b91701d60f1f1a319acf799871c20aee007a.tar.gz
bun-f7e9b91701d60f1f1a319acf799871c20aee007a.tar.zst
bun-f7e9b91701d60f1f1a319acf799871c20aee007a.zip
[parser] Fix symbol collision with require
Fixes https://github.com/oven-sh/bun/issues/674 Fixes https://github.com/oven-sh/bun/issues/382
Diffstat (limited to 'src/runtime.footer.bun.js')
-rw-r--r--src/runtime.footer.bun.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime.footer.bun.js b/src/runtime.footer.bun.js
index 38d5596cb..72a2703e9 100644
--- a/src/runtime.footer.bun.js
+++ b/src/runtime.footer.bun.js
@@ -3,7 +3,6 @@ export var __markAsModule = BUN_RUNTIME.__markAsModule;
export var $$lzy = BUN_RUNTIME.$$lzy;
export var __toModule = BUN_RUNTIME.__toModule;
export var __commonJS = BUN_RUNTIME.__commonJS;
-export var __require = BUN_RUNTIME.__require;
export var __name = BUN_RUNTIME.__name;
export var __export = BUN_RUNTIME.__export;
export var __reExport = BUN_RUNTIME.__reExport;
@@ -16,12 +15,12 @@ export var $$bun_runtime_json_parse = JSON.parse;
export var __internalIsCommonJSNamespace =
BUN_RUNTIME.__internalIsCommonJSNamespace;
-globalThis.require ||= function (moduleId) {
+export var __require = (globalThis.require ||= function (moduleId) {
if (typeof moduleId === "string") {
return import.meta.require(moduleId);
}
return BUN_RUNTIME.__require(moduleId);
-};
+});
globalThis.__internalIsCommonJSNamespace ||=
BUN_RUNTIME.__internalIsCommonJSNamespace;