title: Gulp SourceMaps not working when using gulp-gzip
body: <p>I am using Gulp to uglify javascript files and generate their source map. So far so good:</p>
  
  <pre><code>var gulp = require('gulp');
  var plugins = require('gulp-load-plugins')();
  
  gulp.task('compress-js', ['clean-js'], function() {
    return gulp.src('./resources/js/**/*.js')
      .pipe(plugins.sourcemaps.init())
      .pipe(plugins.uglify())
      .pipe(plugins.rename({extname: '.min.js'}))
      .pipe(plugins.sourcemaps.write('./maps'))
      .pipe(gulp.dest('./public/js'))
      .pipe(plugins.livereload());
  });
  </code></pre>
  
  <p>This code generates the following output folders and files, which are correctly loaded by the browser:</p>
  
  <p><strong>public/js/someScript.min.js</strong></p>
  
  <pre><code>function doSomeStuff(){console.log("This stuff function simply says: hello!!")
  //# sourceMappingURL=maps/someScript.min.js.map
  </code></pre>
  
  <p><strong>public/js/maps/someScript.min.js.map</strong>: Notice this file is referenced in the line above.</p>
  
  <p>However I would also like to gzip them so my updated gulpfile.js is:</p>
  
  <pre><code>gulp.task('compress-js', ['clean-js'], function() {
    return gulp.src('./resources/js/**/*.js')
      .pipe(plugins.sourcemaps.init())
      .pipe(plugins.uglify())
      .pipe(plugins.rename({extname: '.min.js'}))
      .pipe(plugins.sourcemaps.write('./maps'))
      .pipe(plugins.gzip())
      .pipe(gulp.dest('./public/js'))
      .pipe(plugins.livereload());
  });
  </code></pre>
  
  <p>Now I get these files:</p>
  
  <p><strong>public/js/someScript.min.js.gz</strong></p>
  
  <pre><code>function doSomeStuff(){console.log("This stuff function simply says: hello!!")}
  //# sourceMappingURL=maps/someScript.min.js.map
  </code></pre>
  
  <p><strong>public/js/maps/someScript.min.js.map.gz</strong></p>
  
  <p>The source map is not being linked because, the js.gz file references <strong>someScript.min.js.map</strong> instead of <strong>someScript.min.js.map.gz</strong>. What am I missing? How can I make the file reference the correct extension?</p>