add babel/polyfill in Gulp with Babelify and Browserify
<p>I am using Babel and Browserify with Gulp. I want to add <code>babel-polyfill</code> into my project, but it is hard to find what I want to do on internet. <br>
This is <code>node_modules</code> I installed:</p>

<ul>
<li>vinyl-source-stream</li>
<li>vinyl-buffer</li>
<li>gulp</li>
<li>gulp-sourcemaps</li>
<li>browserify</li>
<li>babelify</li>
<li>babel-polyfill</li>
</ul>

<p>And this is my <code>gulpfile.js</code>:</p>

<pre><code>var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var browserify = require('browserify');
var babelify = require('babelify');

gulp.task('default', function() {
    return browserify('./source/app.js')
    .transform(babelify, { presets: ["es2015", "react"] })
    .bundle()
    .pipe(source('app.js'))
    .pipe(buffer())
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest('./dist'));
});
</code></pre>

<p>I tried to add <code>babel-polyfill</code> like other people said but everything is not worked on me. I think it's getting harder and harder when I using gulp + babelify + browserify. next time, I should use webpack.</p>

<p>Anyway, back to the point, is there a way to add babel-polyfill into Gulp + Babelify + Browserify? </p>

<p>I spent hours but I'm still working on it. </p>

<p>Anyone gimme a advice and that will be very appreciated ;)</p>