https://github.com/mishoo/UglifyJS
Revision 98f330658f5cd0dfb3004815d05f123f4110c2e0 authored by Martijn Swaagman on 04 November 2016, 18:49:59 UTC, committed by Richard van Velzen on 29 November 2016, 19:42:56 UTC
If using `inSourceMap` this fix will ensure the copying of `sourcesContent` is based on potentially normalized `sources` values (https://github.com/mozilla/source-map/blob/master/lib/source-map-consumer.js#L304-L309).

For example `normalize` (https://github.com/mozilla/source-map/blob/master/lib/util.js#L80-L123) will rewrite `./dist/mySource.js` to `dist/mySource.js` in the target `_sources` of the `SourceMapConsumer`. As a result `orig_map.sourceContentFor(source, true);` would return `null` since the orginal `source` was no longer available in the consumer. By using the keys generating from the `SourceMapConsumer.constructor` consistency is ensured.
1 parent a7b3b0d
History
Tip revision: 98f330658f5cd0dfb3004815d05f123f4110c2e0 authored by Martijn Swaagman on 04 November 2016, 18:49:59 UTC
Generate source map data from normalized files
Tip revision: 98f3306
File Mode Size
bin
lib
test
tools
.gitignore -rw-r--r-- 35 bytes
.travis.yml -rw-r--r-- 150 bytes
LICENSE -rw-r--r-- 1.3 KB
README.md -rw-r--r-- 38.0 KB
appveyor.yml -rw-r--r-- 350 bytes
npm-shrinkwrap.json -rw-r--r-- 4.2 KB
package.json -rw-r--r-- 1.3 KB

README.md

back to top