Skip to content
Permalink
Browse files
Use absolute source map paths in precompiled files
  • Loading branch information
kugtong33 authored and novemberborn committed Jan 16, 2018
1 parent 72c53be commit aaddc37a72ce42c67b907fd23fb14985e1da8cee
Showing 3 changed files with 7 additions and 9 deletions.
@@ -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}`;
}

Some generated files are not rendered by default. Learn more.

@@ -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",

0 comments on commit aaddc37

Please sign in to comment.