From 6a31893ce5bc8a0d4a3e8a7d6412b69644ab003c Mon Sep 17 00:00:00 2001 From: Dylan Conway Date: Mon, 5 Jun 2023 23:12:18 -0700 Subject: only if assign target is none, tests for cjs/esm bundling --- src/js_parser.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3