Repository: swc-project/swc (rust)

Issue:
inputSourceMap default value is not true
### Describe the bug

The document says the default value of InputSourceMap is true，but it is not actually
![image](https://github.com/swc-project/swc/assets/20736912/63a87283-9eb9-4bef-92ba-bdecff28793d)


### Input code

```typescript
"use strict";

function message() {
  console.log('inline-source-map');
}

message();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlubGluZS1zb3VyY2UtbWFwLnRzIl0sIm5hbWVzIjpbIm1lc3NhZ2UiLCJjb25zb2xlIiwibG9nIl0sIm1hcHBpbmdzIjoiOztBQUFBLFNBQVNBLE9BQVQsR0FBbUI7QUFDakJDLEVBQUFBLE9BQU8sQ0FBQ0MsR0FBUixDQUFZLG1CQUFaO0FBQ0Q7O0FBRURGLE9BQU8iLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBtZXNzYWdlKCkge1xuICBjb25zb2xlLmxvZygnaW5saW5lLXNvdXJjZS1tYXAnKTtcbn1cblxubWVzc2FnZSgpO1xuIl19
```


### Config

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


### Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.4.11&code=H4sIAAAAAAAAA02QX2%2BbMBTF3%2FkUqHtoKy1LoEtbhvowSKFQSgQdf8KbbVxiagyK7ZQw7bvPabpqD1dH179zrnXvmeRY52JHkDizNe1FMiRIz%2FQOcw4afHGp%2F9Z0HfWM9xR%2Fo31zcU4YJQzPeC93CM86MJxf2tofTfuM2Np8%2FkU%2F8ScwDIQ1WRrd1UCAH6qlBIHjH%2FOW98xGW7DjWNxJ8TK7tSHg%2BPr7V3wIzaoMJ1BYMmj7KXLDCV7lh42ZT0E7wKCjEvpUVs%2FGx3smYOG9RSydArrgQbfcwuKf16DoKt5WZkbUnBaaywmaIw3IG4G%2BxU5%2BY4senAF2tcr0ZD0JJ8k8J%2FJiJ8ljJ7q3lCY8XXgOzIIbxVbgNVxF9%2FnJd%2BTZLU8UTxZP776MjCvFqsg3XKVg%2Fc6Sm6OmWep%2FZMj%2FuyWmJWs%2Fl7UbXBeHsKuLZVv7dA%2BJI6oynjZFTR%2Fd1wYbowxc53OXqBv31aFhoFhyVTQq431dhq26j9iUP9njL4EgMxCkozzeBZkeq56bYX2cQw3rLw4Ui6oGAgAA&config=H4sIAAAAAAAAA1WQSw6DIBCG957CzNptu%2BgdPMSEjgYjQmYgKTHevYBg647%2FxRfYu74HsYEVjegEXr3nQEN2F1FJ7umYhEMW4kvnUdw8fpIDpAyKYu08DC1dJEcTrkLFOs4EPPJMvqzkUeuwWivU6tUzetNT%2FAcqaxyTyL2Yq7jNK91xXUWCse9QwvoQHx2d%2BCf8Sg12XQxaxrbMP9IdXxGEbB4qAQAA

### SWC Info output

_No response_

### Expected behavior

swc should consume input source map when inputSourceMap is not specified

### Actual behavior

swc don't consume input source map only when inputSourceMap is explicitly set to true

### Version

1.4.11

### Additional context

_No response_

Pull request:
fix(es): Change default value of `inputSourceMap` to `true`
**Description:**


**Related issue:**

 - Closes #8795

Patch:
diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs
index c1a3b21cbe..02cc37dee7 100644
--- a/crates/swc/src/config/mod.rs
+++ b/crates/swc/src/config/mod.rs
@@ -205,7 +205,7 @@ pub enum InputSourceMap {
 
 impl Default for InputSourceMap {
     fn default() -> Self {
-        InputSourceMap::Bool(false)
+        InputSourceMap::Bool(true)
     }
 }
 


Test patch:
diff --git a/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map b/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map
index d2d9c20826..d8445f1a4e 100644
--- a/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map
+++ b/crates/swc/tests/fixture/sourcemap/issue-6552/input-map/output/index.map
@@ -1,5 +1,5 @@
 {
-  "mappings": "aAAA,IAAMA,IAAM,cACZC,QAAQC,KAAK,CAAC,AAAC,KAAY,OAARC,UACnB,IAAMC,IAAM",
+  "mappings": "aAAA,IAAMA,IAAM,cACZC,QAAQC,KAAR,CAAe,KAAY,OAARC,UAEnB,IAAMC,IAAM",
   "names": [
     "xxx",
     "console",
@@ -9,10 +9,10 @@
   ],
   "rangeMappings": "",
   "sources": [
-    "../../input/index.js"
+    "unknown"
   ],
   "sourcesContent": [
-    "const xxx = ', something';\nconsole.error(`❌ ${message}`);\nconst bbb = '';\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJ4eHgiLCJjb25zb2xlIiwiZXJyb3IiLCJtZXNzYWdlIiwiYmJiIl0sInNvdXJjZXMiOlsidW5rbm93biJdLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCB4eHggPSAnLCBzb21ldGhpbmcnXG5jb25zb2xlLmVycm9yKGDinYwgJHttZXNzYWdlfWApO1xuXG5jb25zdCBiYmIgPSAnJ1xuIl0sIm1hcHBpbmdzIjoiQUFBQSxNQUFNQSxHQUFHLEdBQUcsYUFBWjtBQUNBQyxPQUFPLENBQUNDLEtBQVIsQ0FBZSxLQUFJQyxPQUFRLEVBQTNCO0FBRUEsTUFBTUMsR0FBRyxHQUFHLEVBQVoifQ==\n"
+    "const xxx = ', something'\nconsole.error(`❌ ${message}`);\n\nconst bbb = ''\n"
   ],
   "version": 3
 }