webpack-obfuscator icon indicating copy to clipboard operation
webpack-obfuscator copied to clipboard

Fix sourcemap sourcesContent not aligned to sources

Open linl33 opened this issue 1 year ago • 1 comments

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).

linl33 avatar Jul 07 '23 11:07 linl33