Skip to content

fix: Generate correct source-map when content is not padded #52

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

Merged
merged 3 commits into from
Jan 30, 2019

Conversation

znck
Copy link
Member

@znck znck commented Jan 14, 2019

Revert source-map to v0.6.1 as starting 0.7.0 there is no sync API.

@znck znck requested a review from yyx990803 January 14, 2019 22:35
@haoqunjiang haoqunjiang merged commit 81be0ca into master Jan 30, 2019
@@ -108,5 +119,5 @@ function generateSourceMap(
})
}
})
return map.toJSON()
return JSON.parse(map.toString())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to ask, why is this needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not required with 0.6.1. Please revert this line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂I think I found the answer…
There was a.d.ts file added to the source-map package since v0.5.7, but missing toJSON declaration in SourceMapGenerator until v0.7.0. So we can't use this method unless we patch its type definitions…

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy