Closed dongseok0 closed 5 years ago
Hi,
It seems lazy evaluation is not working when I use babel-plugin-lodash and lodash-webpack-plugin. For example,
_.flow( _.filter(n => { console.log(n); return n > 0; }), _.take(5), )([...Array(12)].map((n, i) => i));
It results with plugin ( lazy evaluation not working )
0 1 2 3 4 5 6 7 8 9 10 11
But lazy evaluation is working well without plugins.
0 1 2 3 4 5
Here's plugin configuration
new LodashModuleReplacementPlugin({ shorthands: true, collections: true, coercions: true, placeholders: true, flattening: true, currying: true, }),
Ah.. it seems fp lazy evaluation is working as chain internally. Which means not supported by plugins. If it's correct, close the issue please!
chain
That's correct @dongseok0!
Hi,
It seems lazy evaluation is not working when I use babel-plugin-lodash and lodash-webpack-plugin. For example,
It results with plugin ( lazy evaluation not working )
But lazy evaluation is working well without plugins.
Here's plugin configuration