webpack-contrib / istanbul-instrumenter-loader

Istanbul Instrumenter Loader
MIT License
273 stars 65 forks source link

Add force-sourcemap to embed inline sourcemaps #25

Closed zakhenry closed 7 years ago

zakhenry commented 8 years ago

This allows a flag to be added to force the embedding of an inline sourcemap to the file. This resolves issues with webpack not outputting sourcemaps for tools like remap-istanbul to function.

I have published this separately at https://www.npmjs.com/package/sourcemap-istanbul-instrumenter-loader if you want to test

TheLarkInn commented 7 years ago

@zakhenry do you perhaps have an example repo that contains typescript with webpack and coverage like this? Is remap-instanbul also required?

zakhenry commented 7 years ago

@TheLarkInn yea this is used in https://github.com/ubiquits/toolchain/blob/master/cli/tasks/test.js and yes remap istanbul is required. Note that the setup isn't trivial though as I merge two coverage reports from two sources (frontend and backend unit tests)

bryanforbes commented 7 years ago

@deepsweet Is there any way we can get you to take a look at this pull request? I don't think the logic needs to be behind a flag/property, but this issue is preventing instrumented transpiled code from being able to be remapped back to the original code via remap-istanbul.

samvloeberghs commented 7 years ago

@bryanforbes, @deepsweet seems to be active on github as he has activity, probably notifications turned off or something. Anyway I tweeted him as I need this as well! https://twitter.com/samvloeberghs/status/773126385074311168

deepsweet commented 7 years ago

hey guys. I'll merge https://github.com/deepsweet/istanbul-instrumenter-loader/pull/28 later today.