Skip to content

Commit

Permalink
Use absolute source map paths in precompiled files
Browse files Browse the repository at this point in the history
  • Loading branch information
kugtong33 authored and novemberborn committed Jan 16, 2018
1 parent 72c53be commit aaddc37
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions lib/caching-precompiler.js
Expand Up @@ -76,9 +76,7 @@ class CachingPrecompiler {

// Append source map comment to transformed code
// So that other libraries (like nyc) can find the source map
const dirPath = path.dirname(filePath);
const relativeMapPath = path.relative(dirPath, mapPath);
const comment = convertSourceMap.generateMapFileComment(relativeMapPath);
const comment = convertSourceMap.generateMapFileComment(mapPath);

return `${result.code}\n${comment}`;
}
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -90,7 +90,7 @@
"code-excerpt": "^2.1.0",
"common-path-prefix": "^1.0.0",
"concordance": "^3.0.0",
"convert-source-map": "^1.2.0",
"convert-source-map": "^1.5.1",
"core-assert": "^0.2.0",
"currently-unhandled": "^0.4.1",
"debug": "^3.0.1",
Expand Down

0 comments on commit aaddc37

Please sign in to comment.