HACK: tolerate files with more than one sourceMappingURL line#4
Open
moio wants to merge 1 commit into
Open
Conversation
Javascript files may have "sourceMappingURL" as part of their source (eg. in a string). This is explicitly not supported by the now-deprecated source-map-resolve module: "So why is source-map-resolve deprecated? Well, source-map-resolve tries to work with source maps completely in general – support every feature and be completely language agnostic. That is a cool goal, but has a couple of flaws: - Finding source map comments. This is done via regex to support any language, but in reality you need to know the language to know what a comment is, as opposed to something that looks like a comment inside a string." https://github.com/lydell/source-map-resolve source-map-resolve will take the first match, but if more than one exists, usually the one last will be correct. This is a workaround for that case. Signed-off-by: Silvio Moioli <silvio@moioli.net>
7 tasks
moio
added a commit
to moio/dashboard
that referenced
this pull request
Oct 29, 2024
The BLOB code from web-worker is minified, and contains source maps that are then passed over by webpack - that creates a situation of minified code inside BLOB inside minified code which confuses some tools, eg. jantimon/chrome-profile-sourcemap-resolver#4 That could be fixed, but the only reason to do so would be supporting very old (pre-2013) browsers, so we are better off removing the polyfill altogether. Signed-off-by: Silvio Moioli <silvio@moioli.net>
moio
added a commit
to moio/dashboard
that referenced
this pull request
Nov 15, 2024
The BLOB code from web-worker is minified, and contains source maps that are then passed over by webpack - that creates a situation of minified code inside BLOB inside minified code which confuses some tools, eg. jantimon/chrome-profile-sourcemap-resolver#4 That could be fixed, but the only reason to do so would be supporting very old (pre-2013) browsers, so we are better off removing the polyfill altogether. Signed-off-by: Silvio Moioli <silvio@moioli.net>
moio
added a commit
to moio/dashboard
that referenced
this pull request
Nov 25, 2024
The BLOB code from web-worker is minified, and contains source maps that are then passed over by webpack - that creates a situation of minified code inside BLOB inside minified code which confuses some tools, eg. jantimon/chrome-profile-sourcemap-resolver#4 That could be fixed, but the only reason to do so would be supporting very old (pre-2013) browsers, so we are better off removing the polyfill altogether. Signed-off-by: Silvio Moioli <silvio@moioli.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Javascript files may have "sourceMappingURL" as part of their source (eg. in a string). This is explicitly not supported by the now-deprecated source-map-resolve module:
"So why is source-map-resolve deprecated? Well, source-map-resolve tries to work with source maps completely in general – support every feature and be completely language agnostic. That is a cool goal, but has a couple of flaws:
https://github.com/lydell/source-map-resolve
source-map-resolve will take the first match, but if more than one exists, usually the one last will be correct.
This is a workaround for that case.
cc @jantimon