WebPack removed and replaced with Gulp


#1

Hi guys,

I’ve upgraded my Ionic CLI to v2.0.0-beta.24 and I see that for whatever reason WebPack has been removed and replaced with Gulp for packaging.

Can you tell me what are the reasons behind this and is this a permanent change?

Cheers
J


Since the Beta 4, my views don't update
#2

The permanent change


#3

There was a post before, they’re switching because Browserify is easier to understand.

Just learned how webpack works, also using it for all my Angular2 projects.
I’m confused to get things working now though :’(


#4

This change was announced more than a month ago, see this topic for details:

If you want to continue to use webpack you can try the following suggestion:

AFAIK it’s a permanent change, but I guess that webpack still might remain supported as an alternative by the Ionic team or by enthusiasts.


#5

Oops, seem to have missed that announcement!

But thanks all for the feedback :thumbsup:


#6

If you’re interested in continuing to use it with Ionic, perhaps you might be interested in this thread.


#7

Thanks, although I feel like I should move away from using WebPack if the norm is now to use Gulp.


#8

I’ve set it up with webpack again. I can’t wrap my head around browserfy might be too simple for what I try todo.

@iignatov Suggested some stuff in a different thread, and all is working well for me now.


#9

The default is browserify, but you should be able to swap out the default build task with webpack easily:

(from https://github.com/driftyco/ionic-conference-app/blob/master/gulpfile.js#L30-L54)

var buildWebpack = require('ionic-gulp-webpack');

gulp.task('watch', ['clean'], function(done){
  runSequence(
    ['sass', 'html', 'fonts', 'scripts'],
    function(){
      gulpWatch('app/**/*.scss', function(){ gulp.start('sass'); });
      gulpWatch('app/**/*.html', function(){ gulp.start('html'); });
      buildWebpack({ watch: true }).then(done);
    }
  );
});

gulp.task('build', ['clean'], function(done){
  runSequence(
    ['sass', 'html', 'fonts', 'scripts'],
    function(){
      buildWebpack().then(done);
    }
  );
});

More info on the available gulp tasks here: https://github.com/driftyco/ionic-gulp-tasks