-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
Description
Maybe I'm missing something obvious. The following code works:
require({
packages: [
{'name': 'lodash', 'location': 'lodash-amd/modern'}
]
}, [
'lodash'
], function (_) {
var value = _.chain([1,5,2,3,5]).filter(function (n) {
return n % 2;
}).map(function (n) {
return n * 2;
}).value();
console.log(value);
});But the following code doesn't:
require({
packages: [
{'name': 'lodash', 'location': 'lodash-amd/modern'}
]
}, [
'lodash/chain'
], function (_) {
var value = _.chain([1,5,2,3,5]).filter(function (n) {
return n % 2;
}).map(function (n) {
return n * 2;
}).value();
console.log(value);
});I seem to remember running in to this while using modules in node as well, and I've tried explicitly loading in functions I want to use, but nothing seems to work. I came across this Stackoverflow question. Is a custom build the only way to get chaining along with minimal build size?