browser-resolve
Advanced tools
Comparing version 1.10.1 to 1.11.0
20
index.js
@@ -73,2 +73,10 @@ // builtin | ||
}); | ||
[ '.js', '.json' ].forEach(function (ext) { | ||
Object.keys(shims).forEach(function (key) { | ||
if (!shims[key + ext]) { | ||
shims[key + ext] = shims[key]; | ||
} | ||
}); | ||
}); | ||
} | ||
@@ -233,10 +241,14 @@ | ||
if (shims[id]) { | ||
var resid = path.resolve(opts.basedir || path.dirname(opts.filename), id); | ||
if (shims[id] || shims[resid]) { | ||
var xid = shims[id] ? id : resid; | ||
// if the shim was is an absolute path, it was fully resolved | ||
if (shims[id][0] === '/') { | ||
return cb(null, shims[id], opts.package); | ||
if (shims[xid][0] === '/') { | ||
return resv(shims[xid], build_resolve_opts(opts, base), function(err, full, pkg) { | ||
cb(null, full, pkg); | ||
}); | ||
} | ||
// module -> alt-module shims | ||
id = shims[id]; | ||
id = shims[xid]; | ||
} | ||
@@ -243,0 +255,0 @@ |
{ | ||
"name": "browser-resolve", | ||
"version": "1.10.1", | ||
"version": "1.11.0", | ||
"description": "resolve which handles browser field support in package.json", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
277
10967
1
0