webpack-contrib / istanbul-instrumenter-loader

Istanbul Instrumenter Loader
MIT License
273 stars 65 forks source link

Support inline source maps #36

Closed sshev closed 7 years ago

sshev commented 7 years ago

In some build configurations source maps are inlined into code and later used from the coverage object via embedSource prop to remap coverage to original code. However update to version 1.1.0 brings latest version of istanbul-lib-instrument which no longer provides embedSource (proof). So source maps get lost and we got "Could not find source map" errors (like here https://github.com/deepsweet/istanbul-instrumenter-loader/issues/35 and https://github.com/AngularClass/angular2-webpack-starter/issues/1117)

This PR handles inline source maps case.

sshev commented 7 years ago

@deepsweet pls check

deepsweet commented 7 years ago

good, but I'd like to use this tested module instead of custom regexp. the less things we have to maintain the better. could you please refactor it?

deepsweet commented 7 years ago

👍

sshev commented 7 years ago

thanks for the hint, just updated PR