olback / es6-css-minify

Easily minify CSS and JavaScript in VS Code
https://marketplace.visualstudio.com/items?itemName=olback.es6-css-minify
MIT License
47 stars 13 forks source link

Can't generate a map file with sources included for js #92

Closed Tim-Veestraeten closed 5 years ago

Tim-Veestraeten commented 5 years ago

Hello,

I can't generate a source file with the original source included. This is option sourceMap: includeSources in terser. This is my configuration:

"es6-css-minify.genJSmap": true,
"es6-css-minify.jsPostfix": "min",
"es6-css-minify.js": {
    "mangle": true,
    "compress": {
        "unused": false
    },
    "output": {
        "quote_style": 0,
        "comments": "/^\\*?!|\\(c\\)|licen[cs]e|copyright/i"
    },
    "sourceMap": {
        "includeSources": true,
    }
}

It does generate the map files, but those don't include the original source I get when run from the command line with --source-map=\"includeSources,filename='${fileBasenameNoExtension}.min.js.map'\"

Thanks, Tim

olback commented 5 years ago

Thanks for reporting the issue.

This is fixed in release 3.3.0. You will have to set es6-css-minify.genJSmap to null to give contorl of the sourceMap object to Terser. That's the only thing you should have to do.

The update will be available in an hour or so.