Whats the difference between Gulp-Browserify and Browserify?

pourmesomecode

I've recently made the transition over from Grunt to Gulp. I'm still fairly new however, could anyone tell me what the difference is between using Gulp-Browserify and just using Browserify?

I know Gulp-Browserify has now been blacklisted and I seen a few discussions about it. I was wondering what the Gulp version did that Browserify doesn't?

JMM

The difference is that browserify doesn't natively read and emit the vinyl files that the gulp pipeline deals with. gulp-browserify was an adapter for that, and I believe it did some extra things related to error handling. If possible I recommend that for the time being you avoid using gulp-browserify. In gulp 4 there may be a better way to integrate browserify with gulp. For now, see if this works for you:

var vss = require('vinyl-source-stream');

gulp.task('whatever', function () {
  var b = browserify(entry, b_opts)
    .transform(some_xform);

  return b.bundle()
    .pipe(vss('bundle.js'))
    // ... gulp stuff
    .pipe(gulp.dest(dest));
});

This will generally require you to do per-file manipulations with browserify transforms and then only do bundle-level manipulation in the gulp pipeline.

Further reading: gulpjs/gulp#369

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

gulp, browserify, maps?

From Dev

Gulp Browserify combine JS

From Dev

Browserify and Babel gulp tasks

From Dev

Gulp Browserify SourceMaps

From Dev

Ignore module with browserify in gulp

From Dev

gulp + browserify transform configuration

From Dev

Gulp + babelify + browserify issue

From Dev

Browserify and Rendr using Gulp

From Dev

How to do this in gulp browserify?

From Java

How to uglify output with Browserify in Gulp?

From Dev

Standard error log in Gulp Browserify

From Dev

gulp browserify shim and jquery depended

From Dev

Make browserify modules external with Gulp

From Dev

Gulp build with browserify environment variable

From Dev

Chain Gulp glob to browserify transform

From Dev

Gulp Browserify ReferenceError: source is not defined

From Dev

Absolute Paths with Gulp Mocha and Browserify

From Dev

using browserify-css in gulp

From Dev

Make browserify modules external with Gulp

From Dev

Gulp build with browserify environment variable

From Dev

gulp browserify + reactify not creating bundle

From Dev

gulp - uglify js files with browserify?

From Dev

What is the difference between browserify external vs. exclude?

From Dev

Difference between sprockets //=require and browserify-rails require()?

From Dev

What is the difference between browserify/requirejs modules and ES6 modules

From Dev

gulp dependent tasks - browserify and a pre-browserify task

From Dev

Build React components with Gulp, Browserify and Babel

From Dev

How to alias a module with Browserify lib in Gulp?

From Dev

Gulp with watchify/browserify runs twice then stops watching