lodash/lodash-webpack-plugin

use _.orderBy is worng

xiemms opened this issue · 6 comments

['_baseIteratee', 'identity']

image
image

image
image

import _ from 'lodash'

 var users = [
  { 'user': 'fred',   'age': 48 },
  { 'user': 'barney', 'age': 34 },
  { 'user': 'fred',   'age': 40 },
  { 'user': 'barney', 'age': 36 }
];

_.orderBy(users, ['user', 'age'], ['asc', 'desc'])

Error in render: "TypeError: iteratee is not a function"
image

i change 'shorthands': [['_baseIteratee', 'identity']] to 'shorthands': [['_baseIteratee', '_baseIteratee']]
it's ok

Hi @xiemms!

If you'd like to enable shorthands you can do so with the plugin options.

ok. thx