Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

How about enabling cache options for Browserify? #5

@leehankyeol

Description

@leehankyeol

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions