Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

predicate is not a function #79

Closed
MinionsHero opened this issue Nov 2, 2016 · 4 comments
Closed

predicate is not a function #79

MinionsHero opened this issue Nov 2, 2016 · 4 comments
Labels

Comments

@MinionsHero
Copy link

Hello,

It makes an error when I use import findIndex from 'lodash/findIndex' with lodash-webpack-plugin,the console shows that “Uncaught TypeError: predicate is not a function(…)“,the error can be located to baseFindIndex。

Thanks very much!

@jdalton
Copy link
Member

jdalton commented Nov 2, 2016

Hi @MinionsHero!

By default the "shorthands" feature set is disabled. I recommend avoiding it because it's pretty heavy. Instead use the _.property or _.matches helpers directly.

@jdalton jdalton closed this as completed Nov 2, 2016
@jdalton jdalton added the invalid label Nov 2, 2016
@kmvan
Copy link

kmvan commented Aug 4, 2017

import { findIndex } from 'lodash'
Is it right?

@MinionsHero
Copy link
Author

MinionsHero commented Feb 7, 2018

To add shorthands:true in lodash-webpack-plugin options will work!otherwise ,do not use this function.

@taewo
Copy link

taewo commented Nov 29, 2019

plugins: [ new LodashModuleReplacementPlugin({ 'shorthands': true }) ] works perfect in my case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants