gulp-browserify icon indicating copy to clipboard operation
gulp-browserify copied to clipboard

Module operates on options object directly

Open RobeeeJay opened this issue 11 years ago • 1 comments

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.

RobeeeJay avatar Aug 07 '14 10:08 RobeeeJay

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

This bug should be fixed.

dongyuwei avatar Dec 09 '15 07:12 dongyuwei