browserify / browser-resolve

resolve function which support the browser field in package.json
MIT License
102 stars 70 forks source link

Pass through original `opts` properties to resolve #52

Closed jmm closed 9 years ago

jmm commented 9 years ago

The purpose of this module is to augment the functionality of resolve, correct? I propose that in build_resolve_opts() instead of replacing opts and blowing away some of its properties, augment it as necessary so that its other original properties are available to resolve.

This will, for example, facilitate generation of useful Cannot find module error messages in resolve. Currently if using browserify and you have 100 files in a directory and one of them generates a Cannot find module error, the error message doesn't tell you which file was the source of the error.

I recommend comparing this with git diff -b to get an overview of the actual changes with less noise.

jmm commented 9 years ago

Awesome, thank you!