If you look at https://github.com/AgentME/gulp-concat-bug-example, you'll see a gulpfile with two very similar tasks, "good" and "bad". As far as I can tell, they should work the same. They should browserify-bundle src/entry.js, use gulp-sourcemaps to parse the sourcemaps, prepend header.js into the stream and then concatenate it into the bundle, use gulpif to possibly minify it, write out the sourcemaps, and then write either good.js or bad.js into out/ depending on which task it was. The "bad" task wraps many of the streams in one call of streamify, "good" uses two streamify calls in an arbitrary way instead. The "bad" task fails to prepend header.js into bad.js.
The issue still appears with all of the sourcemaps stuff removed. I just left it there to show what I was trying to do originally.
If you look at https://github.com/AgentME/gulp-concat-bug-example, you'll see a gulpfile with two very similar tasks, "good" and "bad". As far as I can tell, they should work the same. They should browserify-bundle src/entry.js, use gulp-sourcemaps to parse the sourcemaps, prepend header.js into the stream and then concatenate it into the bundle, use gulpif to possibly minify it, write out the sourcemaps, and then write either good.js or bad.js into out/ depending on which task it was. The "bad" task wraps many of the streams in one call of streamify, "good" uses two streamify calls in an arbitrary way instead. The "bad" task fails to prepend header.js into bad.js.
The issue still appears with all of the sourcemaps stuff removed. I just left it there to show what I was trying to do originally.