Ionic 2 - app.bundle.js - Minification

Are you sure it’s under the build task? For performance reasons, this should typically only run during ‘build’, not ‘watch’ (serve). Also, this was using the latest version of Ionic (the uglify option apparently was added 20 days ago).

gulp.task('build', ['clean'], function(done){
  runSequence(
    ['sass', 'html', 'fonts', 'scripts'],
    function(){
      buildBrowserify({
        minify: true,
        uglifyOptions: {
          mangle: false
        },  
        browserifyOptions: {
          debug: !isRelease
        }   
      }).on('end', done);
    }   
  );  
});
1 Like

i checked it on ionic serve a time ago but using gulp build it is working fine now, thanks :slight_smile: