Skip to content

Commit aaddc37

Browse files
kugtong33novemberborn
authored andcommittedJan 16, 2018
Use absolute source map paths in precompiled files
1 parent 72c53be commit aaddc37

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed
 

‎lib/caching-precompiler.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ class CachingPrecompiler {
7676

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

8381
return `${result.code}\n${comment}`;
8482
}

‎package-lock.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"code-excerpt": "^2.1.0",
9191
"common-path-prefix": "^1.0.0",
9292
"concordance": "^3.0.0",
93-
"convert-source-map": "^1.2.0",
93+
"convert-source-map": "^1.5.1",
9494
"core-assert": "^0.2.0",
9595
"currently-unhandled": "^0.4.1",
9696
"debug": "^3.0.1",

0 commit comments

Comments
 (0)
Please sign in to comment.