From e195d6ca55ebeb4e72e9d3303334d71d2813e9f8 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 13 Feb 2015 23:08:47 +1100 Subject: [PATCH] use relative location when generating the sourceMapName in bin/6to5 for directories - fixes #775 --- bin/6to5/dir.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/6to5/dir.js b/bin/6to5/dir.js index 680119cb97..ba98209960 100644 --- a/bin/6to5/dir.js +++ b/bin/6to5/dir.js @@ -16,7 +16,10 @@ module.exports = function (commander, filenames, opts) { var dest = path.join(commander.outDir, relative); - var data = util.compile(src, { sourceMapName: dest }); + var data = util.compile(src, { + // sourceMapName is the destination relative to the source + sourceMapName: path.relative(dest + '/..', src) + }); if (commander.sourceMaps) { var mapLoc = dest + ".map";