How to use the browserify.exclude function in browserify

To help you get started, we’ve selected a few browserify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github anvaka / npmgraph.an / gulpfile.js View on Github external
function produceMainBundle() {
  var bundle = require('browserify')()
    .exclude('renderer3d')
    .add('./src/scripts/index.js');

  bundle
    .bundle()
    .on('error', function (err) {
      gutil.log(gutil.colors.red('Failed to browserify'), gutil.colors.yellow(err.message));
    })
    .pipe(fs.createWriteStream(path.join(__dirname + '/dist/bundle.js')));
}