Skip to content

Commit

Permalink
fix: Replaced reference id with this.getFilename() to get accurate fi…
Browse files Browse the repository at this point in the history
…lenames
  • Loading branch information
iFaxity committed Apr 3, 2022
1 parent 37fe528 commit 733997a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ export = function istanbulPlugin(opts: IstanbulPluginOptions = {}): Plugin {
}

if (exclude.shouldInstrument(id)) {
const filename = this.getFileName(id);
const sourceMap = sanitizeSourceMap(this.getCombinedSourcemap());
const code = instrumenter.instrumentSync(srcCode, id, sourceMap);
const code = instrumenter.instrumentSync(srcCode, filename, sourceMap);
const map = instrumenter.lastSourceMap();

// Required to cast to correct mapping value
Expand Down

0 comments on commit 733997a

Please sign in to comment.