Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
fix(sourcemaps): failing to resolve absolute urls
Browse files Browse the repository at this point in the history
  • Loading branch information
zanona committed Nov 19, 2017
1 parent a9b1117 commit c50e30b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/sourcemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ function getParentDetails(js, files) {
return files
.filter((f) => f.type === 'html')
.filter((h) => {
return h.includes && h.includes.indexOf(source) >= 0
|| h.href === source;
// remove absolute ^/ since file names come without it
const includes = (h.includes || []).map((i) => i.replace(/^\//, ''));
return includes.indexOf(source) >= 0 || h.name === source;
}).map((h) => {
// line and col on source mapp offset are based
// on the minified/final file, not the original
Expand Down

0 comments on commit c50e30b

Please sign in to comment.