Repository: swc-project/swc (rust)

Issue:
Infinite loop when transpile to `SystemJs` module.
### Describe the bug

I have a `ES Module` format file and need to convert it to `SystemJs`. However, swc seems to enter an infinite loop when transpile the code like `e.a = e.b = e.c = e.d = e.e = e.f = e.g = e.h = e.i = e.j = e.k = e.l = e.m = e.n = e.o = e.p = e.q = e.r = e.s = e.t = e.u = e.v = e.w = e.x = e.y = e.z = e.A = e.B = e.C = e.D = e.E = e.F = e.G = e.H = e.I = e.J = e.K = e.L = e.M = e.N = e.O = e.P = e.Q = e.R = e.S = void 0`.

### Input code

```typescript
Object.defineProperty(e, "__esModule", { value: !0 }), e.a = e.b = e.c = e.d = e.e = e.f = e.g = e.h = e.i = e.j = e.k = e.l = e.m = e.n = e.o = e.p = e.q = e.r = e.s = e.t = e.u = e.v = e.w = e.x = e.y = e.z = e.A = e.B = e.C = e.D = e.E = e.F = e.G = e.H = e.I = e.J = e.K = e.L = e.M = e.N = e.O = e.P = e.Q = e.R = e.S = void 0;
```


### Config

```json
{
  "jsc": {
    "parser": {
      "syntax": "ecmascript",
      "jsx": false
    },
    "target": "es5",
    "loose": false,
    "minify": {
      "compress": false,
      "mangle": false
    }
  },
  "module": {
    "type": "systemjs"
  },
  "minify": false,
  "isModule": true
}
```


### Playground link

_No response_

### Expected behavior

```javascript
// from babel playground
System.register([], function (_export, _context) {
  "use strict";

  return {
    setters: [],
    execute: function () {
      Object.defineProperty(e, "__esModule", {
        value: !0
      }), e.a = e.b = e.c = e.d = e.e = e.f = e.g = e.h = e.i = e.j = e.k = e.l = e.m = e.n = e.o = e.p = e.q = e.r = e.s = e.t = e.u = e.v = e.w = e.x = e.y = e.z = e.A = e.B = e.C = e.D = e.E = e.F = e.G = e.H = e.I = e.J = e.K = e.L = e.M = e.N = e.O = e.P = e.Q = e.R = e.S = void 0;
    }
  };
});
```

### Actual behavior

Can't transpile.

### Version

1.3.33

### Additional context

I tested all swc versions that support systemjs and found it appeared since version 1.3.33.

Pull request:
fix(es/module): Fix handling of continuous assignments in `systemjs`
**Description:**

Fix  transpile the continuous assignment code like `d.a = d.b = d.c = d.d = ... = void 0;` to SystemJS may cause Infinite loop.



**Related issue:**

 - Closes #7143.


Patch:
diff --git a/crates/swc_ecma_transforms_module/src/system_js.rs b/crates/swc_ecma_transforms_module/src/system_js.rs
index 25bc0127a0..520eb06b7d 100644
--- a/crates/swc_ecma_transforms_module/src/system_js.rs
+++ b/crates/swc_ecma_transforms_module/src/system_js.rs
@@ -562,6 +562,15 @@ impl Fold for SystemJs {
                 let assign_expr = AssignExpr {
                     right: match *assign.right {
                         Expr::Ident(ident) => Box::new(self.fold_module_name_ident(ident)),
+                        Expr::Assign(AssignExpr {
+                            op: AssignOp::Assign,
+                            ..
+                        }) => {
+                            return self.replace_assign_expr(AssignExpr {
+                                right: assign.right,
+                                ..assign
+                            });
+                        }
                         _ => assign.right,
                     },
                     ..assign


Test patch:
diff --git a/crates/swc_ecma_transforms_module/tests/system_js.rs b/crates/swc_ecma_transforms_module/tests/system_js.rs
index 2d4cc2cde3..40aeae243f 100644
--- a/crates/swc_ecma_transforms_module/tests/system_js.rs
+++ b/crates/swc_ecma_transforms_module/tests/system_js.rs
@@ -22,6 +22,24 @@ fn tr(_tester: &mut Tester<'_>, config: Config) -> impl Fold {
     )
 }
 
+test!(
+    syntax(),
+    |tester| tr(tester, Default::default()),
+    allow_continuous_assignment,
+    r#"var e = {}; e.a = e.b = e.c = e.d = e.e = e.f = e.g = e.h = e.i = e.j = e.k = e.l = e.m = e.n = e.o = e.p = e.q = e.r = e.s = e.t = e.u = e.v = e.w = e.x = e.y = e.z = e.A = e.B = e.C = e.D = e.E = e.F = e.G = e.H = e.I = e.J = e.K = e.L = e.M = e.N = e.O = e.P = e.Q = e.R = e.S = void 0;"#,
+    r#"System.register([], function (_export, _context) {
+        "use strict";
+        var e;
+        return {
+            setters: [],
+            execute: function () {
+                e = {};
+                e.a = e.b = e.c = e.d = e.e = e.f = e.g = e.h = e.i = e.j = e.k = e.l = e.m = e.n = e.o = e.p = e.q = e.r = e.s = e.t = e.u = e.v = e.w = e.x = e.y = e.z = e.A = e.B = e.C = e.D = e.E = e.F = e.G = e.H = e.I = e.J = e.K = e.L = e.M = e.N = e.O = e.P = e.Q = e.R = e.S = void 0;
+            }
+        };
+    });"#
+);
+
 test!(
     syntax(),
     |tester| tr(