Repository: swc-project/swc (rust)

Issue:
SWC minify mangle cause function parameter name collision with function name
### Describe the bug

before minify
```js
function n(i) {
    var r1 = t[i];
    if (void 0 !== r1) return r1.exports;
    var o1 = t[i] = {
        exports: {}
    };
    return e[i](o1, o1.exports, n), o1.exports;
}
```

after minified:
```js
  function n(n) {
      var r = t[n];
      if (void 0 !== r) return r.exports;
      var i = t[n] = {
          exports: {}
      };
      return e[n](i, i.exports, n), i.exports;
  }
```

this is the `__webpack_require__` function, it will pass it self to another fucntion call, 
but the parameter `i` was renamed to `n` which same as the function name after minified thus cause a runtime error, `n is not a function', and I can reproduce it since @swc/core@1.3.102 

### Input code

```js
function test() {
  (function (module) {
    function FormatSendData(data) {}
    eval();
  })();

  function n(i) {
    var r1 = t[i];
    if (void 0 !== r1) return r1.exports;
    var o1 = (t[i] = {
      exports: {},
    });
    return e[i](o1, o1.exports, n), o1.exports;
  }
}
test();

```


### Config

```json
{
  "jsc": {
    "parser": {
      "syntax": "ecmascript",
      "jsx": false
    },
    "transform": null,
    "target": "es2015",
    "loose": false,
    "externalHelpers": false,
    "minify": {
      "mangle": true,
      "compress": true
    }
  },
  "module": {
    "type": "es6"
  },
  "isModule": true,
  "minify": false
}
```


### Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.7.24&code=H4sIAAAAAAAAA02QwQrCMAyG732KeEthiLtadhNfwKN4KDaDwtZKzYYgfXez1o1dmuTv%2F%2F0N7afwZB8DML0ZNXwVAPariGN000BVBtj0a0yj5RsFd7Fs0ckhnlxMNNsBtZE%2B66WqHRfQr1mzTZBa6IDv%2FmGK5HvAOXoHJzh0ndxqSMRTCtIe6fOKid9mg%2BMC40JLrZnyeHWdZZmmSFlX4h9EYsfYNkKviQ0EvZ%2FL5iqr%2BiFG%2FQD0Y8rwIgEAAA%3D%3D&config=H4sIAAAAAAAAA32QS2oDMRBE9z7FoLUXdiAm5ATZ5AyhkUtGTutDt8Z4ML57NF%2FGwclKUr1StVS3TdOYs1rz3tzqth4yiUKWc1W0i4WuVTGwgdSKz8VsZ3rWHjlixSDdR2KKUFSXJFQaW%2BZZJjmhDGH6stu%2FTkGGU1LMQZOGa4FE4g9whugvGnz0rls%2FNFA8MVZKPy9lxgX8eHlA30D%2BskyqkQL0L4f7l2bxFyqoa8rPTB5vT1QlR%2BL3u4fmlu6qwaaQBdonFmmnZjeTw4R0bFcfNaXLGCs9mMXk9XO29RHjxbmzcer9B1ovmo%2F%2FAQAA

### SWC Info output

_No response_

### Expected behavior

do not collision between function name and function parameter when  function close over it self in its frame

### Actual behavior

_No response_

### Version

1.7.24

### Additional context

_No response_

Pull request:
fix(es/minifier): Avoid decl name when mangle with eval
<!-- Note: CI script will automatically rebase your PR so please do not rebase unless required -->

<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->

**Description:**

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->

**BREAKING CHANGE:**

<!--
If this PR introduces a breaking change, it must contain a notice for it to be included in the CHANGELOG. Add description or remove entirely if not breaking.

You may need to update `MIGRATION.md` for the breaking changes.
-->

**Related issue (if exists):**
Closes #9542 

Patch:
diff --git a/.changeset/warm-lies-work.md b/.changeset/warm-lies-work.md
new file mode 100644
index 0000000000..b6b4bbc6f3
--- /dev/null
+++ b/.changeset/warm-lies-work.md
@@ -0,0 +1,6 @@
+---
+swc_core: patch
+swc_ecma_minifier: patch
+---
+
+fix(es/minifier): Avoid decl name when mangle with eval
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b2d2d1b136..7559906308 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1296,15 +1296,4 @@
 
 - **(es/ast)** Support abstract auto-accessors ([#8736](https://github.com/swc-project/swc/issues/8736)) ([1155ac7](https://github.com/swc-project/swc/commit/1155ac79720512625568c45bfd3542ec340c0ebd))
 
-## [1.4.17] - 2024-04-23
-
-### Bug Fixes
-
-
-
-- **(es/codegen)** Use `Str.raw` for es5 ([#8873](https://github.com/swc-project/swc/issues/8873)) ([c7a06b1](https://github.com/swc-project/swc/commit/c7a06b1a5e3a59abccbd40fed1f65fcf8487fba6))
-
-
-- **(es/compat)** Fix async generator ([#8881](https://github.com/swc-project/swc/issues/8881)) ([063eabd](https://github.com/swc-project/swc/commit/063eabd33cd5ee1dbe9e248462519f76f6eacd36))
-
 <!-- generated by git-cliff -->
diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock
index 23c8a02481..dd0d33e7e4 100644
--- a/bindings/Cargo.lock
+++ b/bindings/Cargo.lock
@@ -237,7 +237,7 @@ dependencies = [
 
 [[package]]
 name = "binding_core_wasm"
-version = "1.7.25"
+version = "1.7.27"
 dependencies = [
  "anyhow",
  "getrandom",
@@ -324,7 +324,7 @@ dependencies = [
 
 [[package]]
 name = "binding_minifier_wasm"
-version = "1.7.25"
+version = "1.7.27"
 dependencies = [
  "anyhow",
  "getrandom",
@@ -337,7 +337,7 @@ dependencies = [
 
 [[package]]
 name = "binding_typescript_wasm"
-version = "1.7.25"
+version = "1.7.27"
 dependencies = [
  "anyhow",
  "getrandom",
@@ -3468,7 +3468,7 @@ dependencies = [
 
 [[package]]
 name = "swc_cli"
-version = "0.91.408"
+version = "0.91.412"
 dependencies = [
  "anyhow",
  "swc_cli_impl",
@@ -3586,9 +3586,9 @@ dependencies = [
 
 [[package]]
 name = "swc_core"
-version = "0.104.0"
+version = "0.104.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d32fe1ea2339444766b03a9984b5789dc6187d068cc6da1be34a2da4ea80dcb"
+checksum = "3d69c2e08f5819f5a075889538eeb4a9e88eeb0df8c024a8537c0fddb76605df"
 dependencies = [
  "binding_macros",
  "swc",
@@ -3730,9 +3730,9 @@ dependencies = [
 
 [[package]]
 name = "swc_ecma_codegen"
-version = "0.156.0"
+version = "0.156.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67ae667bb0ea4233d6eac5d6d628b1da294798869b70160da203746dc8e87728"
+checksum = "91593151f66eb0a731a63e5a5c1253cb51bb04dee2b6733dcb5e5ee0c86480dc"
 dependencies = [
  "memchr",
  "num-bigint",
diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml
index 44a3058fb9..3674f39efe 100644
--- a/bindings/Cargo.toml
+++ b/bindings/Cargo.toml
@@ -30,7 +30,7 @@ resolver = "2"
   swc_common           = "0.38.0"
   swc_compiler_base    = "0.21.0"
   swc_config           = "0.1.15"
-  swc_core             = "0.104.0"
+  swc_core             = "0.104.1"
   swc_css_ast          = "0.145.0"
   swc_css_codegen      = "0.156.0"
   swc_css_minifier     = "0.121.0"
diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml
index 80ad9a08fd..985c5282b8 100644
--- a/bindings/binding_core_wasm/Cargo.toml
+++ b/bindings/binding_core_wasm/Cargo.toml
@@ -6,7 +6,7 @@ license     = "Apache-2.0"
 name        = "binding_core_wasm"
 publish     = false
 repository  = "https://github.com/swc-project/swc.git"
-version     = "1.7.25"
+version     = "1.7.27"
 
 [lib]
 bench      = false
diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml
index fdb69fc511..ede16aaa24 100644
--- a/bindings/binding_minifier_wasm/Cargo.toml
+++ b/bindings/binding_minifier_wasm/Cargo.toml
@@ -6,7 +6,7 @@ license     = "Apache-2.0"
 name        = "binding_minifier_wasm"
 publish     = false
 repository  = "https://github.com/swc-project/swc.git"
-version     = "1.7.25"
+version     = "1.7.27"
 
 [lib]
 bench      = false
diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml
index d0a6b8479a..63a65b0ad1 100644
--- a/bindings/binding_typescript_wasm/Cargo.toml
+++ b/bindings/binding_typescript_wasm/Cargo.toml
@@ -6,7 +6,7 @@ license     = "Apache-2.0"
 name        = "binding_typescript_wasm"
 publish     = false
 repository  = "https://github.com/swc-project/swc.git"
-version     = "1.7.25"
+version     = "1.7.27"
 
 [lib]
 bench      = false
diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml
index eec1b593cb..216fa65c92 100644
--- a/bindings/swc_cli/Cargo.toml
+++ b/bindings/swc_cli/Cargo.toml
@@ -6,7 +6,7 @@ include     = ["Cargo.toml", "src/**/*.rs"]
 license     = "Apache-2.0"
 name        = "swc_cli"
 repository  = "https://github.com/swc-project/swc.git"
-version     = "0.91.408"
+version     = "0.91.412"
 
 [[bin]]
 bench = false
diff --git a/crates/swc_ecma_transforms_base/src/rename/mod.rs b/crates/swc_ecma_transforms_base/src/rename/mod.rs
index fdd55aa941..03aab3ac96 100644
--- a/crates/swc_ecma_transforms_base/src/rename/mod.rs
+++ b/crates/swc_ecma_transforms_base/src/rename/mod.rs
@@ -282,9 +282,41 @@ where
 
     unit!(visit_mut_private_method, PrivateMethod);
 
-    unit!(visit_mut_fn_decl, FnDecl, true);
+    fn visit_mut_fn_decl(&mut self, n: &mut FnDecl) {
+        if !self.config.ignore_eval && contains_eval(n, true) {
+            n.visit_mut_children_with(self);
+        } else {
+            let id = n.ident.to_id();
+            let inserted = self.preserved.insert(id.clone());
+            let map = self.get_map(n, true, false, false);
+
+            if inserted {
+                self.preserved.remove(&id);
+            }
+
+            if !map.is_empty() {
+                n.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
+            }
+        }
+    }
 
-    unit!(visit_mut_class_decl, ClassDecl, true);
+    fn visit_mut_class_decl(&mut self, n: &mut ClassDecl) {
+        if !self.config.ignore_eval && contains_eval(n, true) {
+            n.visit_mut_children_with(self);
+        } else {
+            let id = n.ident.to_id();
+            let inserted = self.preserved.insert(id.clone());
+            let map = self.get_map(n, true, false, false);
+
+            if inserted {
+                self.preserved.remove(&id);
+            }
+
+            if !map.is_empty() {
+                n.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
+            }
+        }
+    }
 
     fn visit_mut_default_decl(&mut self, n: &mut DefaultDecl) {
         match n {
diff --git a/packages/core/package.json b/packages/core/package.json
index e52a827510..b817320ed1 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
 {
     "name": "@swc/core",
-    "version": "1.7.25",
+    "version": "1.7.27",
     "description": "Super-fast alternative for babel",
     "homepage": "https://swc.rs",
     "main": "./index.js",
diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json
index 9aed086537..df77dc39ae 100644
--- a/packages/core/scripts/npm/darwin-arm64/package.json
+++ b/packages/core/scripts/npm/darwin-arm64/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-darwin-arm64",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "darwin"
   ],
diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json
index a2488b151a..d9ff12ce15 100644
--- a/packages/core/scripts/npm/darwin-x64/package.json
+++ b/packages/core/scripts/npm/darwin-x64/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-darwin-x64",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "darwin"
   ],
diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json
index 5fd8d44e58..f40579bc55 100644
--- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json
+++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-linux-arm-gnueabihf",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json
index 0032714c5d..6523f7edc1 100644
--- a/packages/core/scripts/npm/linux-arm64-gnu/package.json
+++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-linux-arm64-gnu",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json
index d07b53a511..df19a2494d 100644
--- a/packages/core/scripts/npm/linux-arm64-musl/package.json
+++ b/packages/core/scripts/npm/linux-arm64-musl/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-linux-arm64-musl",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json
index 1766e1410d..9687ef14c6 100644
--- a/packages/core/scripts/npm/linux-x64-gnu/package.json
+++ b/packages/core/scripts/npm/linux-x64-gnu/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-linux-x64-gnu",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json
index 478ee3ac40..04f8495255 100644
--- a/packages/core/scripts/npm/linux-x64-musl/package.json
+++ b/packages/core/scripts/npm/linux-x64-musl/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-linux-x64-musl",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json
index 444694783b..f17dfec705 100644
--- a/packages/core/scripts/npm/win32-arm64-msvc/package.json
+++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-win32-arm64-msvc",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "win32"
   ],
diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json
index f320274ee1..fa0d61ca61 100644
--- a/packages/core/scripts/npm/win32-ia32-msvc/package.json
+++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-win32-ia32-msvc",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "win32"
   ],
diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json
index da151a9baf..c6a1ba3971 100644
--- a/packages/core/scripts/npm/win32-x64-msvc/package.json
+++ b/packages/core/scripts/npm/win32-x64-msvc/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/core-win32-x64-msvc",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "win32"
   ],
diff --git a/packages/html/package.json b/packages/html/package.json
index 302501c80a..73365b583c 100644
--- a/packages/html/package.json
+++ b/packages/html/package.json
@@ -1,6 +1,6 @@
 {
     "name": "@swc/html",
-    "version": "1.7.25",
+    "version": "1.7.27",
     "description": "Super-fast HTML minifier",
     "homepage": "https://swc.rs",
     "main": "./index.js",
diff --git a/packages/html/scripts/npm/darwin-arm64/package.json b/packages/html/scripts/npm/darwin-arm64/package.json
index 5ebffe629c..5cc6758450 100644
--- a/packages/html/scripts/npm/darwin-arm64/package.json
+++ b/packages/html/scripts/npm/darwin-arm64/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-darwin-arm64",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "darwin"
   ],
diff --git a/packages/html/scripts/npm/darwin-x64/package.json b/packages/html/scripts/npm/darwin-x64/package.json
index 311fef63a0..75115da366 100644
--- a/packages/html/scripts/npm/darwin-x64/package.json
+++ b/packages/html/scripts/npm/darwin-x64/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-darwin-x64",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "darwin"
   ],
diff --git a/packages/html/scripts/npm/linux-arm-gnueabihf/package.json b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json
index 1d0bfaa83d..9f7114a98c 100644
--- a/packages/html/scripts/npm/linux-arm-gnueabihf/package.json
+++ b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-linux-arm-gnueabihf",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/html/scripts/npm/linux-arm64-gnu/package.json b/packages/html/scripts/npm/linux-arm64-gnu/package.json
index 0275ad427b..3e2a85dcfd 100644
--- a/packages/html/scripts/npm/linux-arm64-gnu/package.json
+++ b/packages/html/scripts/npm/linux-arm64-gnu/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-linux-arm64-gnu",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/html/scripts/npm/linux-arm64-musl/package.json b/packages/html/scripts/npm/linux-arm64-musl/package.json
index f21382e6c4..fd3f9e269e 100644
--- a/packages/html/scripts/npm/linux-arm64-musl/package.json
+++ b/packages/html/scripts/npm/linux-arm64-musl/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-linux-arm64-musl",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/html/scripts/npm/linux-x64-gnu/package.json b/packages/html/scripts/npm/linux-x64-gnu/package.json
index 13457b4b74..f63f70a479 100644
--- a/packages/html/scripts/npm/linux-x64-gnu/package.json
+++ b/packages/html/scripts/npm/linux-x64-gnu/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-linux-x64-gnu",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/html/scripts/npm/linux-x64-musl/package.json b/packages/html/scripts/npm/linux-x64-musl/package.json
index a70bf04fe7..d20c087d52 100644
--- a/packages/html/scripts/npm/linux-x64-musl/package.json
+++ b/packages/html/scripts/npm/linux-x64-musl/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-linux-x64-musl",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/html/scripts/npm/win32-arm64-msvc/package.json b/packages/html/scripts/npm/win32-arm64-msvc/package.json
index f42fd273d0..88f407b629 100644
--- a/packages/html/scripts/npm/win32-arm64-msvc/package.json
+++ b/packages/html/scripts/npm/win32-arm64-msvc/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-win32-arm64-msvc",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "win32"
   ],
diff --git a/packages/html/scripts/npm/win32-ia32-msvc/package.json b/packages/html/scripts/npm/win32-ia32-msvc/package.json
index 9c58b48e5b..11492b31fb 100644
--- a/packages/html/scripts/npm/win32-ia32-msvc/package.json
+++ b/packages/html/scripts/npm/win32-ia32-msvc/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-win32-ia32-msvc",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "win32"
   ],
diff --git a/packages/html/scripts/npm/win32-x64-msvc/package.json b/packages/html/scripts/npm/win32-x64-msvc/package.json
index 2b6e4aabf5..ca10321ef0 100644
--- a/packages/html/scripts/npm/win32-x64-msvc/package.json
+++ b/packages/html/scripts/npm/win32-x64-msvc/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/html-win32-x64-msvc",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "win32"
   ],
diff --git a/packages/minifier/package.json b/packages/minifier/package.json
index 4aa223dbe4..0a5c2df709 100644
--- a/packages/minifier/package.json
+++ b/packages/minifier/package.json
@@ -1,6 +1,6 @@
 {
     "name": "@swc/minifier",
-    "version": "1.7.25",
+    "version": "1.7.27",
     "description": "Super-fast alternative for terser",
     "homepage": "https://swc.rs",
     "main": "./index.js",
diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json
index 1a89182d22..52223ff572 100644
--- a/packages/minifier/scripts/npm/darwin-arm64/package.json
+++ b/packages/minifier/scripts/npm/darwin-arm64/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-darwin-arm64",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "darwin"
   ],
diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json
index ad2e26aa25..693b0e26b5 100644
--- a/packages/minifier/scripts/npm/darwin-x64/package.json
+++ b/packages/minifier/scripts/npm/darwin-x64/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-darwin-x64",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "darwin"
   ],
diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json
index 91c7ccb152..2af89fef85 100644
--- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json
+++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-linux-arm-gnueabihf",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json
index b790c2beea..5af19c7da5 100644
--- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json
+++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-linux-arm64-gnu",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json
index e8afb1aa82..3e22caa773 100644
--- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json
+++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-linux-arm64-musl",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json
index 419281128e..8a81574060 100644
--- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json
+++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-linux-x64-gnu",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json
index 294f6b4db6..2d1ccc0787 100644
--- a/packages/minifier/scripts/npm/linux-x64-musl/package.json
+++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-linux-x64-musl",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "linux"
   ],
diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json
index e71c0bf3f0..f1db0b9818 100644
--- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json
+++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-win32-arm64-msvc",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "win32"
   ],
diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json
index cae601fd55..f10e273f5e 100644
--- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json
+++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-win32-ia32-msvc",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "win32"
   ],
diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json
index 28df2a17ca..0944abf2e8 100644
--- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json
+++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@swc/minifier-win32-x64-msvc",
-  "version": "1.7.25",
+  "version": "1.7.27",
   "os": [
     "win32"
   ],


Test patch:
diff --git a/crates/swc/tests/fixture/issues-5xxx/5068/1/output/index.js b/crates/swc/tests/fixture/issues-5xxx/5068/1/output/index.js
index c0b97cb057..7e1982094b 100644
--- a/crates/swc/tests/fixture/issues-5xxx/5068/1/output/index.js
+++ b/crates/swc/tests/fixture/issues-5xxx/5068/1/output/index.js
@@ -3,7 +3,7 @@ function _templateObject() {
     var data = _tagged_template_literal([
         "\n  position: absolute;\n"
     ]);
-    _templateObject = function _templateObject() {
+    _templateObject = function _templateObject1() {
         return data;
     };
     return data;
@@ -12,7 +12,7 @@ function _templateObject1() {
     var data = _tagged_template_literal([
         "\n  position: absolute;\n"
     ]);
-    _templateObject1 = function _templateObject() {
+    _templateObject1 = function _templateObject1() {
         return data;
     };
     return data;
diff --git a/crates/swc_ecma_minifier/tests/mangle/issue-9542/input.js b/crates/swc_ecma_minifier/tests/mangle/issue-9542/input.js
new file mode 100644
index 0000000000..d44d630a48
--- /dev/null
+++ b/crates/swc_ecma_minifier/tests/mangle/issue-9542/input.js
@@ -0,0 +1,16 @@
+function test() {
+    (function (module) {
+        function FormatSendData(data) {}
+        eval();
+    })();
+
+    function n(i) {
+        var r1 = t[i];
+        if (void 0 !== r1) return r1.exports;
+        var o1 = (t[i] = {
+            exports: {},
+        });
+        return e[i](o1, o1.exports, n), o1.exports;
+    }
+}
+test();
diff --git a/crates/swc_ecma_minifier/tests/mangle/issue-9542/output.js b/crates/swc_ecma_minifier/tests/mangle/issue-9542/output.js
new file mode 100644
index 0000000000..9b5612beb9
--- /dev/null
+++ b/crates/swc_ecma_minifier/tests/mangle/issue-9542/output.js
@@ -0,0 +1,15 @@
+function test() {
+    (function(module) {
+        function FormatSendData(n) {}
+        eval();
+    })();
+    function n(r) {
+        var o = t[r];
+        if (void 0 !== o) return o.exports;
+        var i = (t[r] = {
+            exports: {}
+        });
+        return e[r](i, i.exports, n), i.exports;
+    }
+}
+test();