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";