deepak1556 / gulp-browserify

Bundle modules with BrowserifyJS
MIT License
195 stars 45 forks source link

Module operates on options object directly #74

Open RobeeeJay opened 10 years ago

RobeeeJay commented 10 years ago

Okay this one bit me today, took me ages to figure out what was going on... https://github.com/deepak1556/gulp-browserify/blob/master/index.js#L48

You are using the passed options object directly, and not copying it. So if someone (hi there!) decides to set a default options object in their gulpfile, and use it on multiple browserify calls they start getting things like:

Error: module "./utils.js" not found from blahblahblah

Should be easy to fix.

dongyuwei commented 8 years ago

yes. so I need to clone/copy the options: var localOptions = JSON.parse(JSON.stringify(initOptions)); //...

This bug should be fixed.