aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-06-05 23:12:18 -0700
committerGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-06-05 23:12:18 -0700
commit6a31893ce5bc8a0d4a3e8a7d6412b69644ab003c (patch)
tree4d11a20192280ae29a6ec740abf2b8108baf503e /src
parentec71e7afe49d5110f3c9d0eba8e49ea22a549e41 (diff)
downloadbun-dylan/fix-bundling-lodash-es-is-buffer.tar.gz
bun-dylan/fix-bundling-lodash-es-is-buffer.tar.zst
bun-dylan/fix-bundling-lodash-es-is-buffer.zip
only if assign target is none, tests for cjs/esm bundlingdylan/fix-bundling-lodash-es-is-buffer
Diffstat (limited to 'src')
-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 5f46507d7..dfcf6ad0a 100644
--- a/src/js_parser.zig
+++ b/src/js_parser.zig
@@ -17620,7 +17620,7 @@ fn NewParser_(
if (comptime FeatureFlags.unwrap_commonjs_to_esm) {
if (!p.is_control_flow_dead and id.ref.eql(p.exports_ref)) {
- if (!p.commonjs_named_exports_deoptimized) {
+ if (!p.commonjs_named_exports_deoptimized and identifier_opts.assign_target != .none) {
if (identifier_opts.is_delete_target) {
p.deoptimizeCommonJSNamedExports();
return null;