diff --git a/build.js b/build.js index 3f35674aa..75484ca0f 100755 --- a/build.js +++ b/build.js @@ -2050,11 +2050,6 @@ isGlobal = _.contains(exportsOptions, 'global'), isNode = _.contains(exportsOptions, 'node'); - // delete the `_.findWhere` dependency map to enable its alias mapping - if (!isUnderscore || isLodashMethod('findWhere')) { - delete dependencyMap.findWhere; - } - /*------------------------------------------------------------------------*/ var isExcluded = function() { @@ -2072,6 +2067,11 @@ return _.contains(methods, methodName); }; + // delete the `_.findWhere` dependency map to enable its alias mapping + if (!isUnderscore || isLodashMethod('findWhere')) { + delete dependencyMap.findWhere; + } + // methods to include in the build var includeMethods = options.reduce(function(accumulator, value) { return /^include=.*$/.test(value)