cli icon indicating copy to clipboard operation
cli copied to clipboard

Maps generating even after setting `-s false`

Open KunalTanwar opened this issue 3 years ago • 1 comments

Describe the bug

SWC still generating map even after setting --source-map or -s to false

Input code

package.json

"scripts": {
  "compile:ts": "swc source/main.dev.ts -w -s false -q -o dist/main.js"
},

Config

{
  "minify": true,
}

even after removing flags from the script and adding same configuration in .swcrc the output is same

{
  "minify": true,
  "sourceMaps": false
}

Expected behavior

The output should not generate *.js.map file after setting -s to false

Actual behavior

Generating source maps.

Input

image

Output

image

Version

@swc/cli - ^0.1.55, @swc/core - ^1.2.133

KunalTanwar avatar Jan 27 '22 20:01 KunalTanwar

I'm also running in to this. Heres a repo for reproducing: https://github.com/Darkle/swc-test

Also referenced here: https://github.com/swc-project/cli/issues/73

Darkle avatar May 07 '22 09:05 Darkle