aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-30 23:17:25 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-30 23:17:25 -0700
commit8b53b3ed88d2233ce05802da7548f689f93fb06a (patch)
tree298f41916756aa9c221ba43a65f912a2b9ca5d7b
parentc0a1c76edb2a40e70bf6e2689cfee85f18570aea (diff)
downloadbun-8b53b3ed88d2233ce05802da7548f689f93fb06a.tar.gz
bun-8b53b3ed88d2233ce05802da7548f689f93fb06a.tar.zst
bun-8b53b3ed88d2233ce05802da7548f689f93fb06a.zip
FIx esm -> cjs require interop with converted CJS
TODO: make `default` namespace object for these not load the entire wrapper
-rw-r--r--src/js_parser.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js_parser.zig b/src/js_parser.zig
index 4cf4b1aec..1f61dacfe 100644
--- a/src/js_parser.zig
+++ b/src/js_parser.zig
@@ -3338,7 +3338,7 @@ pub const Parser = struct {
}
}
- if (exports_kind == .esm and p.commonjs_named_exports.count() > 0 and !p.unwrap_all_requires) {
+ if ((exports_kind == .esm and p.commonjs_named_exports.count() > 0) or p.unwrap_all_requires) {
exports_kind = .esm_with_dynamic_fallback_from_cjs;
}