diff --git a/lib/package.js b/lib/package.js index 969ec4042..893675ff0 100644 --- a/lib/package.js +++ b/lib/package.js @@ -286,29 +286,6 @@ function derivePackageConfig(pjson, override) { if (override) extend(dpjson, override); - // if there is a "browser" object, convert it into map config for browserify support - if (typeof pjson.browser == 'object') { - dpjson.map = dpjson.map || {}; - for (var b in pjson.browser) { - var mapping = pjson.browser[b]; - if (typeof mapping != 'string') - continue; - if (b.substr(b.length - 3, 3) == '.js') - b = b.substr(0, b.length - 3); - if (mapping.substr(mapping.length - 3, 3) == '.js') - mapping = mapping.substr(0, mapping.length - 3); - - // local maps not supported since this affects the external - // interface for all other modules - // only way to implement is through a module alias replacement - // may be worth considering at some point - if (b.substr(0, 2) == './') - continue; - - dpjson.map[b] = dpjson.map[b] || mapping; - } - } - // finally set the derived package.json as the "jspm" property on the package.json return dpjson; } @@ -456,6 +433,7 @@ exports.download = function(pkg, jspmPackages, options, preload) { .then(function(fresh) { // fire off preloading using early getPackageConfig hook if available + // NB this can run in parallel to download with Promise.all if (endpoint.getPackageConfig) // we only use the getPackageConfig pjson if // we are going to run a build, otherwise we use the saved one @@ -595,7 +573,7 @@ exports.createMain = function(pkg, pjson, downloadDir) { // create the main entry point .then(function() { lastNamePart = pkg.name.split('/').pop().split(':').pop(); - main = typeof pjson.browser == 'string' && pjson.browser || typeof pjson.main == 'string' && pjson.main; + main = typeof pjson.main == 'string' && pjson.main; if (main) { if (main.substr(0, 2) == './')