Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix for -r to preserve targets

  • Loading branch information...
commit 3094df4264fa2d5bac2f237c35cecf60c6507a5e 1 parent 2d00359
@substack authored
Showing with 12 additions and 3 deletions.
  1. +11 −2 bin/cmd.js
  2. +1 −1  package.json
View
13 bin/cmd.js
@@ -119,10 +119,19 @@ if (argv.ignore) bundle.ignore(argv.ignore);
if (req.match(/:/)) {
var s = req.split(':');
bundle.require(s[0], { target : s[1] });
+ return;
}
- else {
- bundle.require(req);
+
+ if (!/^[.\/]/.test(req)) {
+ try {
+ var res = resolve.sync(req, { basedir : process.cwd() });
+ }
+ catch (e) {
+ return bundle.require(req);
+ }
+ return bundle.require(res, { target : req });
}
+ bundle.require(req);
});
(argv._.concat(argv.entry || [])).forEach(function (entry) {
View
2  package.json
@@ -1,6 +1,6 @@
{
"name" : "browserify",
- "version" : "1.13.1",
+ "version" : "1.13.2",
"description" : "browser-side require() for js directories and npm modules",
"main" : "index.js",
"bin" : {
Please sign in to comment.
Something went wrong with that request. Please try again.