We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sourceRoot
Hi,
I'm having an issue with resolving to the correct file paths when the sourceRoot is webpack://.
webpack://
Here is my investigation notes:
Example Sourcemap:
{ "version":3, "sources":["./src/app/helloworld.js"], ... "sourceRoot":"webpack://" }
Example:
let result = _resolveSource({ sourcemap: { sourceRoot: "webpack://" } }, "src/app/helloworld.js");
Should probably return src/app/helloworld.js but currently returns webpack:/src/app/helloworld.js
src/app/helloworld.js
webpack:/src/app/helloworld.js
Maybe changing this line (https://github.com/istanbuljs/v8-to-istanbul/blob/master/lib/v8-to-istanbul.js#L87) from :
const sourceRoot = rawSourceMap.sourcemap.sourceRoot ? rawSourceMap.sourcemap.sourceRoot.replace('file://', '') : ''
to:
const sourceRoot = rawSourceMap.sourcemap.sourceRoot ? rawSourceMap.sourcemap.sourceRoot.replace(/(^file:\/\/)|(^webpack:\/\/)/, '') : ''
As a workaround, I can override the sourceRoot property to 'file://'.
'file://'
System: OS: macOS 10.15.1 CPU: (4) x64 Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz Memory: 281.22 MB / 8.00 GB Binaries: Node: 14.11.0 - ~/.nvm/versions/node/v14.11.0/bin/node npm: 6.14.8 - ~/.nvm/versions/node/v14.11.0/bin/npm npmPackages: nyc: ^15.1.0 => 15.1.0 typescript: ^4.1.3 => 4.1.3 v8-to-istanbul: ^7.1.0 => 7.1.0
Thanks!
The text was updated successfully, but these errors were encountered:
@tomardern what's the expected behavior? should we just be dropping webpack:// in this case?
Sorry, something went wrong.
@bcoe For my case, yes, I'm not an expert on sourcemaps, so I'm not totally sure.
No branches or pull requests
Hi,
I'm having an issue with resolving to the correct file paths when the
sourceRoot
iswebpack://
.Here is my investigation notes:
Example Sourcemap:
Example:
Should probably return
src/app/helloworld.js
but currently returnswebpack:/src/app/helloworld.js
Maybe changing this line (https://github.com/istanbuljs/v8-to-istanbul/blob/master/lib/v8-to-istanbul.js#L87) from :
to:
As a workaround, I can override the
sourceRoot
property to'file://'
.Environment Information
Thanks!
The text was updated successfully, but these errors were encountered: