aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.js
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-04-12 18:40:21 -0700
committerGravatar GitHub <noreply@github.com> 2023-04-12 18:40:21 -0700
commitff5c522712f4b9abb5614cc5c866f9c2b37070eb (patch)
tree08bc68f5cd3374d3a731790b0c5d1fb0e5349329 /src/runtime.js
parent14f87156a2213cd099600bcfba9f98050d45b948 (diff)
downloadbun-ff5c522712f4b9abb5614cc5c866f9c2b37070eb.tar.gz
bun-ff5c522712f4b9abb5614cc5c866f9c2b37070eb.tar.zst
bun-ff5c522712f4b9abb5614cc5c866f9c2b37070eb.zip
bundler bug fixes (#2637)
* append import to outer wrapper prefix * print space * require text loader * import empty esm and cjs * add text to schema
Diffstat (limited to 'src/runtime.js')
-rw-r--r--src/runtime.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/runtime.js b/src/runtime.js
index b4631ea1e..7255a5ace 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -176,12 +176,8 @@ export var __internalIsCommonJSNamespace = /* @__PURE__ */ namespace =>
((namespace.default && namespace.default[cjsRequireSymbol]) || namespace[cjsRequireSymbol]);
// require()
-export var __require = /* @__PURE__ */ namespace => {
- if (__internalIsCommonJSNamespace(namespace)) {
- return namespace.default();
- }
-
- return namespace;
+export var __require = /* @__PURE__ */ id => {
+ return import.meta.require(id);
};
export var $$m = __commonJS;