Martyn Martyn - 1 year ago 152
Javascript Question

Gulp-sourcemaps not creating a sourcemap file?

I'm trying to get Gulp sourcemaps to write files, but I can't see these files anywhere. If any new files were created in the working tree, I would see them in

git status
, but nothing no new files to be found.

Below is my gulpfile.js

var gulp = require('gulp'),
sourcemaps = require('gulp-sourcemaps'),
minify = require('gulp-minify'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify');

gulp.task('js', function() {

return gulp.src('src/js/**/*.js')

Is this correct usage? From the examples I've seen elsewhere, this should be OK. I also see that these plugins are compatable with sourcemaps:

Answer Source

Using the sourcemaps.write() method the way you do appends a source maps line to the all.js file. If you want to write external source map files, you'll need to pass the path to the sourcemaps.write() method:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download