{"action":"created","issue":{"url":"https://api.github.com/repos/terinjokes/gulp-uglify/issues/64","labels_url":"https://api.github.com/repos/terinjokes/gulp-uglify/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/terinjokes/gulp-uglify/issues/64/comments","events_url":"https://api.github.com/repos/terinjokes/gulp-uglify/issues/64/events","html_url":"https://github.com/terinjokes/gulp-uglify/issues/64","id":46792548,"number":64,"title":"soucemaps on browserify output only work with compress = false","user":{"login":"rob-bateman","id":549488,"avatar_url":"https://avatars.githubusercontent.com/u/549488?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-bateman","html_url":"https://github.com/rob-bateman","followers_url":"https://api.github.com/users/rob-bateman/followers","following_url":"https://api.github.com/users/rob-bateman/following{/other_user}","gists_url":"https://api.github.com/users/rob-bateman/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-bateman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-bateman/subscriptions","organizations_url":"https://api.github.com/users/rob-bateman/orgs","repos_url":"https://api.github.com/users/rob-bateman/repos","events_url":"https://api.github.com/users/rob-bateman/events{/privacy}","received_events_url":"https://api.github.com/users/rob-bateman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/terinjokes/gulp-uglify/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2014-10-24T23:04:16Z","updated_at":"2015-08-14T17:03:21Z","closed_at":null,"body":"I've been pulling my hair out with this one, but it would seem that the uglifyjs setting `compress` influences whether sourcemaps are maintained when using gulp-uglify.\r\n\r\nThe only defining factor in my setup that i can see is the fact that the js input for uglify is coming from a browserify step further up my gulp task list (yes i know browserify has its own options for sourcemaps but i can't seem to get any of them to work effectively).\r\n\r\nI've isolated the problem to the following:\r\n\r\nthis works\r\n\r\n    return gulp.src('./bin/js/app.js')\r\n            .pipe(sourcemaps.init({loadMaps:true}))\r\n            .pipe(uglify({compress:false}))\r\n            .pipe(sourcemaps.write('./',{sourceRoot:'./'}))\r\n            .pipe(gulp.dest('./bin/js/'));\r\n\r\nthis doesn't work\r\n\r\n    return gulp.src('./bin/js/app.js')\r\n            .pipe(sourcemaps.init({loadMaps:true}))\r\n            .pipe(uglify())\r\n            .pipe(sourcemaps.write('./',{sourceRoot:'./'}))\r\n            .pipe(gulp.dest('./bin/js/'));\r\n\r\n\r\nin the second setup, the sourcemaps *appear* to work but when i set breakpoints and step through the code, everything after the main entry point source file is mapped incorrectly\r\n\r\nWhats surprising is the lack of effectiveness of the compress option - leaving it on only knocks about 10k off a 580k file with it off so I'm happy to leave it like this, but was wondering if anyone else had experienced similar issues"},"comment":{"url":"https://api.github.com/repos/terinjokes/gulp-uglify/issues/comments/131181196","html_url":"https://github.com/terinjokes/gulp-uglify/issues/64#issuecomment-131181196","issue_url":"https://api.github.com/repos/terinjokes/gulp-uglify/issues/64","id":131181196,"user":{"login":"terinjokes","id":273509,"avatar_url":"https://avatars.githubusercontent.com/u/273509?v=3","gravatar_id":"","url":"https://api.github.com/users/terinjokes","html_url":"https://github.com/terinjokes","followers_url":"https://api.github.com/users/terinjokes/followers","following_url":"https://api.github.com/users/terinjokes/following{/other_user}","gists_url":"https://api.github.com/users/terinjokes/gists{/gist_id}","starred_url":"https://api.github.com/users/terinjokes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terinjokes/subscriptions","organizations_url":"https://api.github.com/users/terinjokes/orgs","repos_url":"https://api.github.com/users/terinjokes/repos","events_url":"https://api.github.com/users/terinjokes/events{/privacy}","received_events_url":"https://api.github.com/users/terinjokes/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T17:03:20Z","updated_at":"2015-08-14T17:03:20Z","body":"@wwalser it used to be there, but was removed in a PR by the creator of gulp-sourcemaps in https://github.com/terinjokes/gulp-uglify/commit/8b9fc8c124fb8fc691cb3fdfc2bff26f9ea32129."}}