Gulp Browserify SourceMaps

▼魔方 西西 提交于 2019-12-02 11:35:40

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/28457564/gulp-browserify-sourcemaps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!