Skip to content

Commit

Permalink
Read source maps relative to JS file
Browse files Browse the repository at this point in the history
  • Loading branch information
danvk committed Oct 23, 2015
1 parent 7454264 commit 7201ffe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -86,7 +86,7 @@ function loadSourceMap(jsFile, mapFile) {
// Try to read a source map from a 'sourceMappingURL' comment.
var converter = convert.fromSource(jsData);
if (!converter) {
converter = convert.fromMapFileSource(jsData, '.');
converter = convert.fromMapFileSource(jsData, path.dirname(jsFile));
}
if (!converter) {
console.error('Unable to find a source map.');
Expand Down
2 changes: 1 addition & 1 deletion testdata/foo.min.js

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

0 comments on commit 7201ffe

Please sign in to comment.