Speed up initial loading by browserify

All you know the initial loading time of ionic 2 is still long, may take more than 5 seconds.
I have read an article of how to speed up :

But I have no idea how to do it actually, there is no other related tutorial of ionic 2 regarding this.
May I know do any one have such experience ? Could you please share the steps ?
Many thanks.


the steps are in the article you just linked to…

if you are looking for the file to change your browserify options that would be:


1 Like

Thanks for your reply.

And from the readme file of ionic-gulp-browserify-typescript, there is an example as below. Should I put to node_modules/gulp to start the service?

var browserifyBuild = require('ionic-gulp-browserify-typescript');

gulp.task('build', browserifyBuild);

gulp.task('watch', function(){
  return browserifyBuild({
    watch: true,
    browserifyOptions: { debug: false } //if you want to disable sourcemaps

But I got the error when run ionic serve.
“There is an error in your gulpfile:
ReferenceError: gulp is not defined”

May I know how to start this service ?

Many thanks so much ! I am new to it :slight_smile:

I don’t know enough to answer your question on this topic, but if i was you i wouldn’t spend much time on it for now.

have a look at the blog: blog and especially ‘Moving Forward’ part

The next beta, which i think will be released soon will be migrating from Browserify to Webpack 2.


@eheading I would also recommend you to wait for the next release, as @fishgrind already suggested. It should include offline template compiling and probably other performance improvements. Check out the following issue for more details: