bahmutov / really-need

Node require wrapper with options for cache busting, pre- and post-processing
MIT License
109 stars 4 forks source link

Overwrite require() in a project but exclude node_modules #15

Open raine opened 9 years ago

raine commented 9 years ago

I'm thinking about ways one might incorporate ramda-t in development process without too much hassle.

One of those I've considered is conditionally overwriting require in non-production environment so that if you require('ramda') instead of vanilla Ramda you'd get ramda-t.

In order for this to be a feasible approach, the require overwrite should only apply to the project's own files.

I know based on the README that really-need can be used to overwrite require in the way I described, but I also understood that it would apply to global scope and affecting all dependencies as well.