Bug report or Feature request?
Version (complete output of terser -V or specific git commit)
4.0.1
Complete CLI command or minify() options used
I haven't found the actual cause yet but there are bug reports from Vue CLI & Gatsby claiming fresh installs failed due to a source map error, and can be fixed by downgrading terser to v4.0.0 (tested in the Vue CLI project).
Related:
https://github.com/vuejs/vue-cli/issues/4210
https://github.com/gatsbyjs/gatsby/issues/15249
ping @fabiosantoscode
The direct cause: https://github.com/terser-js/terser/commit/7d47254125d8dc3c6eb9f762e42a675ff9582b13
The root cause: https://github.com/mozilla/source-map/issues/385
Current yarn workaround is to add the following inside your package.json file:
"resolutions": {
"terser": "4.0.0"
}
I don't know of an equivalent for npm but there's likely something~
I encountered this issue related by webpacker (ruby wrap webpack).
The version of terser has been changed to 4.0.1 => 4.0.0.
yarn add [email protected]
I hope this bug is fixed.
:/ This issue has reached my attention and I'll be temporarily reverting the offending PR.
Thanks @sodatea for investigating the precise cause of the bug down to the commit hash :heart: it's very appreciated.
Most helpful comment
:/ This issue has reached my attention and I'll be temporarily reverting the offending PR.
Thanks @sodatea for investigating the precise cause of the bug down to the commit hash :heart: it's very appreciated.