Gulp Browserify SourceMaps [英] Gulp Browserify SourceMaps

查看:75
本文介绍了Gulp Browserify SourceMaps的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看过这个问题了,在我的情况下答案不起作用: gulp,browserify,地图?

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

这就是我所拥有的:

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设置为true,为什么我没有得到任何源地图?

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

更新:由于源地图出现在Chrome和Firefox中,这似乎是IE问题。但这很奇怪,因为我 是通过以前的browserify构建过程在IE中获取源地图的。但是现在,无论我使用哪种浏览器化过程,我似乎都无法在IE中获得任何源映射。

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?

推荐答案

好,所以解决方案是我试图使用browserify-shim转换,这显然破坏了源映射IE浏览器。

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

这篇关于Gulp Browserify SourceMaps的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆