diff --git a/lib/sourcemaps.js b/lib/sourcemaps.js index feab7ab..8be808d 100644 --- a/lib/sourcemaps.js +++ b/lib/sourcemaps.js @@ -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