Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sourcemap sourcesContent not aligned to sources #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

linl33
Copy link

@linl33 linl33 commented Jul 7, 2023

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

@bas-coolgames
Copy link

I can confirm that this pull request fixes the main issue I've been having with this package. I can live with working from the fork, but it'd be nicer if this was also fixed in the main version on the npm registry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants