mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 20:07:49 +00:00
Correct exportsOptions in build.js.
Former-commit-id: 35c8977e27bea40431392e02c300625ce6459cca
This commit is contained in:
12
build.js
12
build.js
@@ -2669,13 +2669,11 @@
|
|||||||
var exportsOptions = (function() {
|
var exportsOptions = (function() {
|
||||||
var result = options.reduce(function(result, value) {
|
var result = options.reduce(function(result, value) {
|
||||||
return /^exports=.*$/.test(value) ? optionToArray(value).sort() : result;
|
return /^exports=.*$/.test(value) ? optionToArray(value).sort() : result;
|
||||||
}, isUnderscore
|
}, isModularize
|
||||||
? ['commonjs', 'global', 'node']
|
? []
|
||||||
: allExports.slice()
|
: (isUnderscore ? ['commonjs', 'global', 'node'] : _.without(allExports, 'npm'))
|
||||||
);
|
);
|
||||||
return isModularize
|
return isModularize ? _.first(result, 1) : result;
|
||||||
? _.first(result, 1)
|
|
||||||
: _.pull(result, 'npm');
|
|
||||||
}());
|
}());
|
||||||
|
|
||||||
// used to specify the AMD module ID of Lo-Dash used by precompiled templates
|
// used to specify the AMD module ID of Lo-Dash used by precompiled templates
|
||||||
@@ -4493,7 +4491,7 @@
|
|||||||
var isCustom = !isNoDep && (
|
var isCustom = !isNoDep && (
|
||||||
isLegacy || isMapped || isModern || isStrict || isUnderscore || outputPath ||
|
isLegacy || isMapped || isModern || isStrict || isUnderscore || outputPath ||
|
||||||
/(?:category|exclude|exports|iife|include|minus|plus)=.*$/.test(options) ||
|
/(?:category|exclude|exports|iife|include|minus|plus)=.*$/.test(options) ||
|
||||||
!_.isEqual(exportsOptions, allExports)
|
!_.isEqual(exportsOptions, ['amd', 'commonjs', 'global', 'node'])
|
||||||
);
|
);
|
||||||
|
|
||||||
// used as the basename of the output path
|
// used as the basename of the output path
|
||||||
|
|||||||
Reference in New Issue
Block a user