Fix #4765: .map file should always have the same output base filename as the generated .js file (#4784)

This commit is contained in:
Geoffrey Booth 2017-11-16 13:30:40 -08:00 committed by GitHub
parent 637fe305a6
commit a706a64a6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -534,7 +534,7 @@
// same directory as the `.js` file.
writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap = null) {
var compile, jsDir, sourceMapPath;
sourceMapPath = outputPath(sourcePath, base, ".js.map");
sourceMapPath = `${jsPath}.map`;
jsDir = path.dirname(jsPath);
compile = function() {
if (opts.compile) {

View File

@ -401,7 +401,7 @@ mkdirp = (dir, fn) ->
# If `generatedSourceMap` is provided, this will write a `.js.map` file into the
# same directory as the `.js` file.
writeJs = (base, sourcePath, js, jsPath, generatedSourceMap = null) ->
sourceMapPath = outputPath sourcePath, base, ".js.map"
sourceMapPath = "#{jsPath}.map"
jsDir = path.dirname jsPath
compile = ->
if opts.compile