Can someone explain how to guess and then concat and finally create a source map using gulp? I can not make it work. I donβt see anything in the API about this, but it seems to me that it should be supported. The point is to generate the source map and use the source files when setting breakpoints. I tried putting concat in the following code first, but when I do this, breakpoints do not work in the Chrome browser.
I use concat = require('gulp-concat'), and uglify = require('gulp-uglify') .
gulp.src(['src/app.js', 'src/**/*.js']) .pipe(sourcemaps.init()) .pipe(uglify({ compress: { negate_iife: false } })) .pipe(concat("app.concat.js")) .pipe(rename('app.min.js')) .pipe(sourcemaps.write('./')) .pipe(gulp.dest('public/js'));
Edgar martinez
source share