After coding for a while, my bundle() started to take about 4-5 seconds, which is quite a lot when developing an app. So I googled around and found out I can actually enable cache options for Browserify.
In gulpfile.bable.js, I changed the following code (btw there're duplicated watchify.args.debug = true; in the code.)
// Input file.
watchify.args.debug = true;
var bundler = browserify('src/app.js', watchify.args);
into
// Input file.
var bundler = browserify({
entries: ['src/app.js'],
cache: {},
packageCache: {},
debug: true,
plugin: [watchify],
});
and now bundling became much faster than before. Not really sure that what I've done makes sense so if there's anything wrong please let me know.
Always enjoying your courses and screencasts, thanks!