Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
defaultJSExtension removal is unnecessary as wont duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Aug 6, 2015
1 parent 06ec71c commit a9d4b0a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,6 @@ function getCanonicalName(loader, normalized) {
normalized = normalized.substr(0, pluginIndex);
}

// defaultJSExtensions handling
if (loader.defaultJSExtensions && normalized.split('/').pop().split('.').pop() == 'js') {
// if we're in a package that disables defaultJSExtensions, leave as-is
var isDefaultExtensionPackage = false;
for (var p in loader.packages) {
if (normalized.substr(0, p.length) == p && (normalized.length == p.length || normalized[p.length] == '/')) {
if ('defaultExtension' in loader.packages[p])
isDefaultExtensionPackage = true;
}
}

// remove defaultJSExtension
if (!isDefaultExtensionPackage)
normalized = normalized.substr(0, normalized.length - 3);
}

// now just reverse apply paths rules to get canonical name
var pathMatch, pathMatchLength = 0;
var curMatchlength;
Expand Down

0 comments on commit a9d4b0a

Please sign in to comment.