Skip to content
Browse files

fix creation of relative file target to use deepest node_modules dire…

…ctory
  • Loading branch information...
1 parent 9187599 commit 765a226978b25f43f763503d03eca7771891f705 @nateps nateps committed Apr 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/wrap.js
View
2 lib/wrap.js
@@ -289,7 +289,7 @@ function makeTarget (file, root) {
return file.slice(base.length);
}
else if (file.match(/\/node_modules\/.+/)) {
- return path.normalize(file.match(/(\/node_modules\/.+)/)[1]);
+ return path.normalize(file.match(/.*(\/node_modules\/.+)/)[1]);
}
else {
throw new Error('Can only load non-root modules'

0 comments on commit 765a226

Please sign in to comment.
Something went wrong with that request. Please try again.