ngryman / gulp-bro

:punch: gulp + browserify + incremental build, done right.
MIT License
122 stars 13 forks source link

Excluding a module #49

Closed herkyl closed 6 years ago

herkyl commented 6 years ago

I am trying to exclude some modules from my build but it's not working. How can I fix this?

const config = {
  exclude: ['sockjs-client', 'ws'],
  transform: [
    babelify.configure({presets: ['es2015']}),
    ['configurify', {pattern: "**/*config.js"}],
    ['uglifyify', {global: true}]
  ]
};
herkyl commented 6 years ago

Ended up using browserify directly for this. Similar to this recipe and adding the exclude parameters like so:

['sockjs-client', 'ws'].forEach(module => b.exclude(module));

In truth this might have worked with gulp-bro as well, but I discovered too late that I was using an ancient version of browserify 🙈