Currently when UglifyJS compresses a given input file that comes with a source-map, but the source-map does not have mappings for all code parts in the input file. e.g. the input file has been generated and some specific code-parts have been generated and are not originating from any source-file. In that case if mappings before the "generated code" are collected, and the original file location for the "generated code" is determined after previous mappings for the same line have been recorded, UglifyJS just ignores the fact that there is no original location and the previous segment is not terminated. This causes the "generated code" incorrectly to be mapped to the previous segment/ original source location.
3 lines
925 B
JavaScript
3 lines
925 B
JavaScript
function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i]}return arr2}else{return Array.from(arr)}}var _require=require("bar"),foo=_require.foo;var _require2=require("world"),hello=_require2.hello;foo.x.apply(foo,_toConsumableArray(foo.y(hello.z)));
|
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0Mi5qcyJdLCJuYW1lcyI6WyJfcmVxdWlyZSIsInJlcXVpcmUiLCJmb28iLCJfcmVxdWlyZTIiLCJoZWxsbyIsIngiLCJhcHBseSIsIl90b0NvbnN1bWFibGVBcnJheSIsInkiLCJ6Il0sIm1hcHBpbmdzIjoicUtBQUEsSUFBY0EsU0FBQUMsUUFBQSxPQUFQQyxJQUFBRixTQUFBRSxJQUNQLElBQWdCQyxVQUFBRixRQUFBLFNBQVRHLE1BQUFELFVBQUFDLE1BRVBGLElBQUFHLEVBQUFDLE1BQUFKLElBQU1LLG1CQUFHTCxJQUFBTSxFQUFBSixNQUFBSyIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IHtmb299ID0gcmVxdWlyZShcImJhclwiKTtcbmNvbnN0IHtoZWxsb30gPSByZXF1aXJlKFwid29ybGRcIik7XG5cbmZvby54KC4uLmZvby55KGhlbGxvLnopKTtcbiJdfQ==
|