From 2ec8ff729eebb58a2d55d0c1b7507aaea328f80d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esa=C3=BA=20Garc=C3=ADa=20S=C3=A1nchez-Torija?= <2669347+egasato@users.noreply.github.com> Date: Tue, 22 May 2018 15:35:52 +0200 Subject: [PATCH] Fix issue #862 (#863) * Fix issue #862 The following changes were applied: - Added a condition where the property "file" is checked. If it doesn't exist it is copied from the original source file. * Fix indentation typo * Fix index.js with 'yarn lint --fix' --- packages/gulp-babel-minify/src/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/gulp-babel-minify/src/index.js b/packages/gulp-babel-minify/src/index.js index 5ea7df0fd..14270f260 100644 --- a/packages/gulp-babel-minify/src/index.js +++ b/packages/gulp-babel-minify/src/index.js @@ -63,6 +63,9 @@ function gulpBabelMinify( if (success) { file.contents = new Buffer(result.code); if (file.sourceMap) { + if (!result.map.hasOwnProperty("file")) { + result.map.file = file.sourceMap.file; + } applySourceMap(file, result.map); } return callback(null, file);