Search code examples
gulpbrowserifysource-maps

Gulp Browserify SourceMaps


I've looked at this question already and the answer doesn't work in my situation: gulp, browserify, maps?

So here is what I have:

gulp.task('debug-app-js', function () {
    console.log('DEBUG-APP-JS');
    var src = './node_modules/js/app-main.js',
        dst = '../www/js',
        bundler = browserify(src, {debug:true});

    return bundler.bundle()
        .pipe(source('app-build.js'))
        .pipe(gulp.dest(dst))
});

Debug is set to true, so why don't I get any sourcemaps?

UPDATE: It appears to be an IE problem as the sourcemaps are appearing in Chrome and Firefox. But it's strange because I was getting sourcemaps in IE with my previous browserify build process. But now I can't seem to get any sourcemaps in IE no matter what browserify process I use. Any ideas?


Solution

  • Ok so the solution was I was trying to use browserify-shim transforms, which apparently wrecks the source maps for IE.