Looks like the source map files are blank.
My code is as follows.
gulp.src(sources)
.pipe(uglifyjs('app.min.js', {
outSourceMap: true
}))
.pipe(gulp.dest('public/js'))
.pipe(notify({message: 'Scripts task complete'}));
in the browser my image looks like this
Notice how the source files are blank. Not sure what I am doing wrong here. Can you please help.
I will add that my source files are using the module pattern i.e.
(function () {
"use strict";
//my code in here
}())
Per the gulp-uglifyjs documentation:
With the above in mind, you likely need to add two options to your gulp-uglifyjs call in your gulpfile:
sourceRoot, whose value is the url of the server from which you want to be able to access the source maps (e.g. http://localhost:3000).
basePath, which should map from your gulpfile's containing directory to the relative path of your webserver root. For example, if your webserver is serving it's content from the directory 'src' within your gulpfile's containing directory you would want to use a value of "/src".
The following example assumes you're running a webserver at http://localhost:3000 and that your webserver root is in a directory "src" immediately within the directory containing your gulpfile:
Helpful references: