Skip to content

vue-loader is incompatible with remap-istanbul because of missing "file" property on sourcemap. #1189

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

Closed
Ross-Esmond opened this issue Mar 10, 2018 · 2 comments

Comments

@Ross-Esmond
Copy link

Ross-Esmond commented Mar 10, 2018

Version

14.2.1

Reproduction link

https://github.com/scry/VueCoverage

Steps to reproduce

clone the repo, yarn install, karma start.

Karma will break because of these lines in remap-istanbul.

remap-istanbul expects sourcemaps to have the "file" property, but vue-loader isn't setting it.

What is expected?

parser.js should be passing the file option to SourceMapGenerator, as per SourceMapGenerator docs.

Link to line in vue-loader.

What is actually happening?

parser.js skips the file property, which results in a map being exported without file specified.


This causes an issue specifically with remap-istanbul. I thought the bug was theirs for a while but it looks like it's a saner fix in vue-loader.

@Ross-Esmond
Copy link
Author

Ross-Esmond commented Mar 10, 2018

I added a pull for reference. #1190 It's almost a one-liner.

@yyx990803
Copy link
Member

Thanks for the PR!

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

No branches or pull requests

2 participants