Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inputSourceMap default value is not true #8795

Closed
littleprincewdk opened this issue Apr 1, 2024 · 1 comment · Fixed by #8801
Closed

inputSourceMap default value is not true #8795

littleprincewdk opened this issue Apr 1, 2024 · 1 comment · Fixed by #8801
Assignees
Labels
Milestone

Comments

@littleprincewdk
Copy link

Describe the bug

The document says the default value of InputSourceMap is true,but it is not actually
image

Input code

"use strict";

function message() {
  console.log('inline-source-map');
}

message();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlubGluZS1zb3VyY2UtbWFwLnRzIl0sIm5hbWVzIjpbIm1lc3NhZ2UiLCJjb25zb2xlIiwibG9nIl0sIm1hcHBpbmdzIjoiOztBQUFBLFNBQVNBLE9BQVQsR0FBbUI7QUFDakJDLEVBQUFBLE9BQU8sQ0FBQ0MsR0FBUixDQUFZLG1CQUFaO0FBQ0Q7O0FBRURGLE9BQU8iLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBtZXNzYWdlKCkge1xuICBjb25zb2xlLmxvZygnaW5saW5lLXNvdXJjZS1tYXAnKTtcbn1cblxubWVzc2FnZSgpO1xuIl19

Config

{
  "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

@kdy1 kdy1 added this to the Planned milestone Apr 2, 2024
@kdy1 kdy1 self-assigned this Apr 2, 2024
@kdy1 kdy1 closed this as completed in #8801 Apr 3, 2024
kdy1 added a commit that referenced this issue Apr 3, 2024
@kdy1 kdy1 modified the milestones: Planned, v1.4.12 Apr 4, 2024
@swc-bot
Copy link
Collaborator

swc-bot commented May 4, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators May 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants