webpack-obfuscator
webpack-obfuscator copied to clipboard
Fix sourcemap sourcesContent not aligned to sources
The sources
array of merged source maps is not always in the same order as the original sources
array. By using the original source map's sourcesContent
together with the merged source map's sources
, the 2 array might not be aligned, which produces a malformed source map.
I believe sourcesContent
gets copied from input to the merged source map because the multi-stage-sourcemap
library at one point did not produce sourcesContent
. But multi-stage-sourcemap
has added support for sourcesContent
since version 0.3.0
(this project requires ^0.3.1
).